February 18, 2019

Flutter As Quickly As Possible

Flutter As Quickly As Possible

I've been exploring the Flutter SDK for a few months now and I'm quite impressed with it. There are still a few problems that I encountered but I'm still unsure if it was due to the SDK limitation or I was just doing something weird. I won't go too much into detail as my last post was way longer than I'd like so I'm going to try to keep this short and get to the point as quickly as possible.

Flutter is fast in many ways, from development speed to runtime and performance speed. Flutter uses Dart language, which isn't very popular as far as I know but it's actually pretty neat and fun to use. I personally use Visual Studio Code and with the Dart and Flutter Plugins, writing Dart code for a Flutter app is without a doubt, the best experience I've ever had. Flutter also has "stateful hot reload" and I'm not sure if it's new to development but it definitely is to me and it's a game changer. Imagine you are developing a feature that requires you to get jump through hoops to get to the desired state. Now, every time you make a change, you're going to need to re-compile, re-run and get back to that state to see the changes you made. This is where stateful hot reload come in. You can re-compile and reload without going back to initial state. I know, it sounds crazy but you just have to try it yourself.

It's not too difficult to see from a high level on how stateful hot reload is possible, just run the codes on a virtual machine. The downside of VM, however, is the speed when compared to running the codes natively. Flutter, however, only uses VM during development or debug mode. It could compile to native ARM codes with Flutter SDK as the render engine and the performance is just as fast as a native platform app. I'm actually somewhat surprised, as that mean the Cupertino style widgets are rendered by Flutter, not from iOS SDK, which mean Flutter SDK will be a bit behind iOS SDK. However, there are so many more advantages, the main one being apps feel and look the same across all iOS versions, and well actually all platform. Beside, beautifully designed apps wouldn't use the native components plainly anyway.

As promised, I kept it short. There are so much more I want to talk about Flutter but it relies heavily on community packages and that hasn't mature enough yet. If it get even half as developed as Node.js community, I would say it will be the new standard SDK for cross-platform apps. I also hasn't gotten enough experience with it yet, as I encountered some problems or limitation when working with the Flutter Firebase packages. I'm going to give it (and me) more time to mature because I go more in dept about it.