Flutter at IO Extended Kuala Lumpur 2019 — Follow-up
Tags: security, mobileappdevelopment, flutter, softwaredevelopment
Published: 2019-06-19 12:25:15

---
title: Flutter at IO Extended Kuala Lumpur 2019 — Follow-up
published: true
tags: security,mobile-app-development,flutter,software-development
canonical_url: https://medium.com/flutter-community/flutter-at-io-extended-kuala-lumpur-2019-follow-up-9f5904a3ab26
---

I just went back from IO Extended Kuala Lumpur 2019 ([#IOxKL19](https://twitter.com/hashtag/ioxkl19?src=hash)), and my talk seemed to generate lots of interest and questions (questions at [#IOxKL19](https://twitter.com/hashtag/ioxkl19?src=hash) were asked asynchronously using [https://app.sli.do](https://app.sli.do/)) I could not answer all of them on stage, so here’s the follow-up. There’s no such thing as “stupid question”, so I will answer them all.

![](https://cdn-images-1.medium.com/max/800/1*eFhf9jLd9nrB1l_j7jb82Q.gif)

These questions are sorted in chronological order, and some of them might already be answered by subsequent slides, but for the sake of completeness, I will keep everything here, including the answers I have given. If you are interested in some particular topics only, please use the table of content below to navigate. Questions in bold are my favorite ones.

- [Why Flutter and not web/hybrid app?](https://medium.com/p/9f5904a3ab26#765f)
- [**Any recommendations for someone starting completely new?**](https://medium.com/p/9f5904a3ab26#a35a)
- [What is the disadvantage of using Flutter?](https://medium.com/p/9f5904a3ab26#ed3c)
- [**How’s the readiness of Flutter for large banking enterprise?**](https://medium.com/p/9f5904a3ab26#9086)
- [Can we integrate native frameworks (iOS) in Flutter?](https://medium.com/p/9f5904a3ab26#8885)
- [How fast we can build a custom framework in Flutter instead of waiting for the community?](https://medium.com/p/9f5904a3ab26#da64)
- [Can you develop games with Flutter? Any downfalls or performance issues?](https://medium.com/p/9f5904a3ab26#3d48)
- [Current app running on AngualarJS, planning to ReactN now. Considering Flutter. What’s the recommendation?](https://medium.com/p/9f5904a3ab26#d098)
- [How about custom views? Performance and feasibility?](https://medium.com/p/9f5904a3ab26#19f5)
- [Why does Sliver not couple well with TabBarView with scrollable content each 🙁](https://medium.com/p/9f5904a3ab26#0bae)
- [Will flutter\_web be merged into Flutter in future? So in 1 codebase can deploy to 3 platforms (Android, iOS, Web)](https://medium.com/p/9f5904a3ab26#2de6)
- [Anywhere easier to get flutter widgets?](https://medium.com/p/9f5904a3ab26#3138)
- [Easy state management for Flutter?](https://medium.com/p/9f5904a3ab26#4581)
- [**If I already have an experience with Angular wouldn’t it be better to choose ionic as a cross-platform framework instead of Flutter?**](https://medium.com/p/9f5904a3ab26#95ff)
- [Can I have the code for Flappy Bird clone in Github or anything? 😆](https://medium.com/p/9f5904a3ab26#57dd)
- [What do you use to stream your phone screen? Look very smooth](https://medium.com/p/9f5904a3ab26#eea8)
- [Should I fully avoid](https://medium.com/p/9f5904a3ab26/edit#0181)[setState?](https://medium.com/p/9f5904a3ab26/edit#0181)
- [How should my company adopt Flutter if I have native apps already?](https://medium.com/p/9f5904a3ab26/edit#aff4)
- [Do you have any experience with admob and alarm manager? When we use both plugins at the same time, app crashes with a useless dump stack!](https://medium.com/p/9f5904a3ab26/edit#6a80)

### Why Flutter and not web/hybrid app?

See [If I already have experience with Angular wouldn’t it be better to choose ionic as a cross platform framework instead of Flutter?](https://medium.com/p/9f5904a3ab26/edit#95ff)

### Any recommendations for someone starting completely new?

For noobs, first learn about basic programming concepts, such as assigning variables, comparison, logical (and, or, xor, not) and arithmetic operations, flow control. Then learn about using source version control, my preference and recommendation is Git. Then learn about unit test and train yourself to be a software craftsman/craftswoman and your mindset always to have test automation following the [test pyramid](https://martinfowler.com/bliki/TestPyramid.html); optionally learn and practice TDD and pair programming. Now that you have a good software development background, try this

- [https://flutter.dev/docs/get-started/install](https://flutter.dev/docs/get-started/install)
- [https://codelabs.developers.google.com/?cat=Flutter](https://codelabs.developers.google.com/?cat=Flutter)

Then head out to [https://github.com/flutter/flutter](https://github.com/flutter/flutter), where they have \>50 issues tagged as [easy fix](https://github.com/flutter/flutter/labels/easy%20fix), solve one and get your PR merged. Congratulation 🎉, not only did you “get started” with Flutter, but also became a Flutter contributor!

And then follow some social media as mentioned later in the talk:

- Official Flutter [Youtube](https://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw) (especially [The Boring Show series](https://www.youtube.com/watch?v=vqPG1tU6-c0&list=PLjxrf2q8roU3ahJVrSgAnPjzkpGmL9Czl)), [Medium](https://medium.com/flutter), [@flutterdev](http://twitter.com/flutterdev)
- MTechViral [Youtube](https://www.youtube.com/channel/UCFTM1FGjZSkoSPDZgtbp7hA), [@imthepk](http://twitter.com/imthepk)
- Flutter Community [Medium](https://medium.com/flutter-community), [@FlutterComm](http://twitter.com/FlutterComm)
- r/FlutterDev [Reddit](https://www.reddit.com/r/FlutterDev/) and [@r\_FlutterDev](http://twitter.com/r_FlutterDev)
- Other international English speaking and local/non-English online/offline community

Finally, also checkout issues tagged as [would be a good package](https://github.com/flutter/flutter/labels/would%20be%20a%20good%20package), and implement one. Congratulation 🎉, you are now a Flutter Guru in 200 words or less 😆

### What is the disadvantage of using Flutter?

As mentioned later in the talk: these are 13 most popular Github issues

![](https://cdn-images-1.medium.com/max/1024/0*9Hscm_UkezZTBCOx)<figcaption>1–6 out of 13 issues having more than 100 👍</figcaption>

![](https://cdn-images-1.medium.com/max/1024/0*PsnpkiE7_meHupwg)<figcaption>7–13 out of 13 issues having more than 100 👍</figcaption>

![](https://cdn-images-1.medium.com/max/1024/0*MxSeSsMjJdDdEXff)<figcaption>Source: <a href="https://www.reddit.com/r/FlutterDev/comments/7kfit2/dart_kotlin/">https://www.reddit.com/r/FlutterDev/comments/7kfit2/dart_kotlin/</a></figcaption>

![](https://cdn-images-1.medium.com/max/1024/0*3tRwreifIZKWbSGR)<figcaption>Source: <a href="https://www.reddit.com/r/FlutterDev/comments/7kfit2/dart_kotlin/">https://www.reddit.com/r/FlutterDev/comments/7kfit2/dart_kotlin/</a></figcaption>

In short:

- ObjC \< Java \< Dart \< Swift/Kotlin; Dart is lack of null safety, LLVM optimization, tail recursive, “when”, etc.
- Lack of iOS bitcode → no 🍎⌚️
- No code push / hot update (but for me it means nothing; for those who needs this, please consider PWA, NativeScript or ReactNative, see also here about the cons of PWA, NS, RN)
- 1st party plugins are written ObjC/Java (I wish they were in Swift/Kotlin)
- Other popular ones in these 13 issues can be achieved with a workaround

### How’s the readiness of Flutter for large banking enterprise?

(This answer was revised following the talk after I have done some more research)

Flutter is already used by large enterprises for e-commerce, entertainment of social media app. I am not yet aware of any known banking app in Flutter, the closest one can be [JD Digits](https://www.crunchbase.com/organization/jd-finance), formerly known as JD Finance, a fintech company in Series B with total 5 billion USD investment. You can see more at [https://flutter.dev/showcase](https://flutter.dev/showcase) and [https://itsallwidgets.com/](https://itsallwidgets.com/).

That being said, at the moment, I myself have to suffer a crappy UI-stupid web/hybrid app 😭 from one of the largest bank in the world (don’t want to mention the bank name, but I think it came from Hong Kong or Shanghai 😉), so nothing can be worst than that. Anyway, for a mobile banking app, security (confidentiality, integrity, availability) is the most important aspect, and in my opinion, we have all 3 green checkmarks.

#### Confidentiality

Confidentiality can be achieved mostly with data encryption.

For data-in-motion encryption, is taken care of by the system (mostly with HTTPS or TLS), so every solution is equivalent.

For data-at-rest encryption, it is also taken care by the OS, but developers must be aware to turn it on (such as using sandboxed/encrypted environment for storing local data, use user’s password as the encryption key for local data, disable back-up).

For data-in-use, Dart is a modern safe language, so your code is not vulnerable to some common attacks, such as stack overflow, buffer overflow, format string vulnerability, race condition. As a security best practice, however, always update your dependency, including Flutter SDK to the latest stable version.

[Code obfuscation is possible for Dart/Flutter](https://github.com/flutter/flutter/wiki/Obfuscating-Dart-Code), but it still needs to be thoroughly tested. However, I have been using a crappy banking app (from a big Vietnamese bank) that I easily decompiled and even got the private seed data for eOTP generator (after which I immediately stopped using this bank).

confidentiality ✅

#### Integrity

For integrity, let’s talk about app signing and root/jail-break detection. App signing is done by CLI tools or distribution platforms, and once again all solutions are equivalent. Root/jail-break detection is used by sensible banks (Nordea, the bank I used when I was in Finland has this), and the app refuses to start if it detects it is running on rooted / jail-broken devices. While it might not be directly possible to detect root/jail-break in Dart, for the time being, we can easily do it on the native side and “cross-the-bride” using platform channel to provide such information to Dart/Flutter side.

integrity ✅

#### Availability

For availability, it’s mostly about user authentication in my opinion. Authentication can be done with traditional username/password/otp, or with device biometric using 1st party plugin [local\_auth](https://pub.dev/packages/local_auth). Developers can also do such that whenever the app is back to the foreground, it requires re-authentication.

availability ✅

### Can we integrate native frameworks (iOS) in Flutter?

Yes, using [platform-integration/platform-channels](https://flutter.dev/docs/development/platform-integration/platform-channels). In short, we integrate native framework to the native side of the app, and then communication between Dart/Flutter side with the framework (which is on the native side) is done via platform channel. The framework you are asking better be a logic/data-intensive one (i.e. not a UI framework) 😝, because Flutter already has great support for most UI/animation, such as [charts\_flutter](https://pub.dev/packages/charts_flutter).

We actually do this ourselves when we integrated our app with an IoT device, which comes with a native framework as part of its SDK.

### How fast we can build a custom frameworks in Flutter instead of waiting for the community?

I assume “custom frameworks” here refers to libraries, plugins, packages, etc. The answer is less than a week, maybe, depends on your needs. Instructions are available at [developing-packages](https://flutter.dev/docs/development/packages-and-plugins/developing-packages). I have done so myself or in collaboration with others, such as [websocket](https://pub.dev/packages/websocket), [graphql](https://pub.dev/packages/graphql), [uuid\_enhanced](https://pub.dev/packages/uuid_enhanced).

Before thinking about building your own package, remember, _Don’t Reinvent The Wheel_, check on pub.dev and/or Github first. You might want to use ready-made and well-tested package, or just fork available code to use (and make a PR if you are nice enough). If there’s none still, by all means, develop it by yourself and raise your use case on [https://github.com/flutter/flutter](https://github.com/flutter/flutter), they will likely tag your issue as [_would be a good package_](https://github.com/flutter/flutter/labels/would%20be%20a%20good%20package) and how knows, someone starting (Flutter) completely new might help you with that package.

### Can you develop games with Flutter? Any downfalls or performance issues?

😆 as shown in the last slide, “Oh one more thing”, I presented the clone of Flappy Bird game in Flutter. Here’s a nice instruction [Building a 2D game in Flutter](https://blog.geekyants.com/building-a-2d-game-in-flutter-a-comprehensive-guide-913f647846bc) using [flame](https://pub.dev/packages/flame), the Flutter game engine. [2048](https://www.google.com/search?q=2048+flutter&oq=2048+flutter&aqs=chrome..69i57j0l5.3608j0j7&sourceid=chrome&ie=UTF-8) is also popular as a Flutter clone. Another prominent 2D game engine in Flutter is [SpriteWidget](https://www.spritewidget.com/).

That being said, these are 2D game/game-engine only (not 3D), and quite simple. So far the performance (even on my crappy Samsung A3 2014) is good, but looking at the performance overlay, I strongly believe flame has lots of room to improve. One example is that flame does not yet support [shouldRepaint](https://api.flutter.dev/flutter/rendering/CustomPainter/shouldRepaint.html) method ([#110](https://github.com/flame-engine/flame/issues/110)), meaning that even if we don’t change any pixels across frames, the whole screen is wasted repainting again, 60 fps!

### Current app running on AngualarJS, planning to ReactN now. Considering Flutter. What’s the recommendation?

Give Flutter a try. One of the mistakes I made in the past was that I thought mobile app development is about coding to show a static (hello world) UI only. Spoiler alert, it is actually much more, including coding, animation, automated testing, clean architecture, and profiling/benchmarking ([including battery efficiency](https://flutter.dev/docs/testing/ui-performance#benchmarking)). Try to avoid making the mistakes I did 😉

### How about custom views? Performance and feasibility?

Take a look at this [tremendous article](https://medium.com/flutter-community/flutter-platformview-how-to-create-flutter-widgets-from-native-views-366e378115b6) from Flutter Community. TLDR: feasibility, yes; performance: try to avoid if you can.

### Why does Sliver not couple well with TabBarView with scrollable content each 🙁

Raincheck on this question 😅. You can follow or DM me [@truongsinhtn](https://twitter.com/truongsinhtn) for further info or discussion. Meanwhile, do you know that we can mix Cupertino widgets with Material widgets to achieve desirable tab view UI, as seen here in one of [the Boring Show episodes](https://youtu.be/QFmrgkIwAds?t=573).

### Will flutter\_web be merged into Flutter in future? So in 1 codebase can deploy to 3 platforms (Android, iOS, Web)

Merge, yes; 3 platforms, no, because it must be MUCH MORE than 3 😝.

Remember, the strategy of Flutter is to unify development experience, or “write once render everywhere”, and thus one codebase is not only limited to Android, iOS, Web, but also Windows, Mac, Linux, [Fuchsia](https://en.wikipedia.org/wiki/Google_Fuchsia), embedded. Did you know that Google Nest Hub (formerly known as Google Home Hub), the grand prize of [#IOxKL19](https://twitter.com/hashtag/ioxkl19?src=hash) lucky draw, [have the UI built with Flutter](https://www.reddit.com/r/Fuchsia/comments/blyutb/the_nest_hub_devices_are_built_on_fluttercould/).

{% tweet 1125868510645669888 %}

### Anywhere easier to get flutter widgets?

Not sure about whether I understand this question correctly, but maybe [widget catalog](https://flutter.dev/docs/development/ui/widgets), [Widget gallery android app](https://play.google.com/store/apps/details?id=io.flutter.demo.gallery&hl=en), pub.dev, GitHub, [https://material.io/develop/flutter/](https://material.io/develop/flutter/). Remember, Material has adopted Flutter as a first-class platform.

### Easy state management for Flutter?

There are many easy state management solution that you may have difficulty choosing 🤣. My preference is BLoC and Provider for testability and clean architecture.

### If I already have experience with Angular wouldn’t it be a better to choose ionic as a cross-platform framework instead of Flutter?

With Angular code base, you have several options, NativeScript, Ionic, PWA (with or without Trusted Web Activities). NativeScript is like RN but with Angular instead of React, Ionic and PWA are web-view wrapped in an app. PWA with Trusted Web Activities can be listed on Google Play Store only (not iOS App Store).

However, you should ONLY consider web/hybrid app if you plan NOT to have lots of hardware communication (such as audio, video, [connectivity](https://developer.android.com/guide/topics/connectivity), [sensors](https://developer.android.com/guide/topics/sensors)), and your styling/animation can be expressed mostly using CSS. Hardware communication is possible to some extent, but the level of accessibility, reliability, performance, and maturity varies across solutions and OS’s. Animation using JS is possible, but the performance can go wrong in thousands of ways. When JS animation goes wrong, without extensive profiling tools, it’s like you are shooting in the dark. Basically, you need John Wick or TMNT in JS to get out of this deep shit (believe me, been there done that 😂)

### Can I have the code for Flappy Bird clone in Github or anything? 😆

Sorry, this question was asked 2 minutes too early 😝, after the quick demo, GitHub link and QR code were provided, here it is again:

[https://github.com/truongsinh/fluttery\_dash/releases/tag/v0.0.1](https://github.com/truongsinh/fluttery_dash/releases/tag/v0.0.1)

### What do you use to stream your phone screen? Look very smooth

[Genymobile/scrcpy](https://github.com/Genymobile/scrcpy)

### Should I fully avoid setState?

No, setState sometimes is good in conjunction with other state management strategies, when you want to encapsulate the widget behavior. However, when using setState, you must not write the [unit test](https://flutter.dev/docs/cookbook/testing/unit/introduction) to validate the setState logic as a unit, but instead, write [widget test](https://flutter.dev/docs/cookbook/testing/widget/introduction) (or [integration test](https://flutter.dev/docs/cookbook/testing/integration/introduction)). Think about internal state and setState as a @private method in OOP.

If the business logic for setState is starting to get complicated, it’s might be a call for action of refactoring.

Besides, having app states in state management, and this state management have a persistent mechanism, if the app crash in the middle of the user flow, we can recover exactly to that screen when the app is restarted. For example, the user logins, browses through the pictures, opens one, writes 200 words of comment, app crashes. If we have the state persisted, once app re-opens, it will be exactly at the comment box of that specific picture, with 200 words pre-populated (autosave so to say).

### How should my company adopt Flutter if I have native apps already?

We are also doing this ourselves as well. I am an Agile evangelist, and I believe in iterative and incremental, thus my advise is to gradually embed Flutter in your current native app instead of rebuilding from scratch.

- [General instruction](https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps)
- [6 workarounds from the general instruction, for Android](https://hackernoon.com/how-to-add-flutter-to-your-production-android-app-4b5150de9e44)
- one small workaround for iOS [#32791](https://github.com/flutter/flutter/pull/32791)

### Do you have any experience with admob and alarm manager? When we use both plugins at the same time, app crashes with a useless dump stack!

Sorry, I don’t, but please double check if you are using 1st party plugin, [firebase\_admob](https://pub.dev/packages/firebase_admob) and [android\_alarm\_manager](https://pub.dev/packages/android_alarm_manager), follow there instruction. If the app still crashes, post the stack dump on [Github](https://github.com/flutter/flutter), and community, collaborators or core member will look at that. It’s likely a bug, and reporting bugs is one way to contribute to Flutter.

### Epilogue

It is my honor to be invited to [#IOxKL19](https://twitter.com/hashtag/ioxkl19?src=hash) as a speaker, it has been a wonderful memory. I was surprised by the level of interest from the attendees, and even more so when getting questions from one of the sponsors’ representatives at the event. From the bottom of my heart, thank you [GDG KL](https://www.gdgkl.org/) and[Sunway Tech Club](https://www.facebook.com/sunwaytechclub/) for being fabulous organizers, thank you, sponsors. But most importantly, thank you, attendees; without you, this event could not have happened.

![](https://cdn-images-1.medium.com/max/1024/1*mdbbk07vmyq_9he5DW7cUQ.jpeg)<figcaption>“I know it’s my 7th questions already, so I promise this is the last one”, “Oh no, I’m actually happy that you are interested. Even if you run out of the questions now, feel free to contact me later”</figcaption>

_This article is free, and so is your clap👏. Did you know you can press the clap👏 button 50 times?_

[Flutter Community (@FlutterComm) | Twitter](https://twitter.com/FlutterComm)

* * *