|The Future Is Flutter...|
|Written by Mike James|
|Thursday, 06 December 2018|
Is Google's Flutter just another attempt to rescue a failed language - Dart - or is it the future of mobile development? It really is too early to say, but with the release of Flutter 1.0 the balance seems to be moving to the future view.
So Dart sort of drifted off into a backwater until someone had a brilliant idea - Flutter.
Dart - Flutter - you see the connection?
Take the Dart language and add a runtime environment or "app engine" in Flutter speak, and you have something that can run outside of a browser. Make the runtime environment available for Android and iOS and you have a way to create apps that aren't native but are closer to native than web apps. From here you can extend the runtime to work in the browser or on the desktop and you have a complete cross-platform solution in one language and one framework.
So I suppose the real question is why move to Flutter when you could choose Cordova or Xamarin?
Good question and hard to answer.
The official line is that Flutter is fast. It claims to compile to native 32-bit and 64-bit ARM code - no mention of x86. It also makes a point of saying that it uses the Skia 2D graphics engine, which is used by Chrome and Android - but not iOS, which they don't point out. Animation at 60fps is claimed and 120fps perhaps in the future.
The real problem is how do you do the UI?
Flutter comes with its own UI framework, which is much like any other UI framework. It has lots of "view" objects which you build into hierarchies using a container. A quick look at the available objects will remind you of almost any other UI framework. Indeed, it looks a lot like the early Android framework with a row and column linear layout, a stack and grid. What is missing is the infamously complex - sorry I meant to say sophisticated - Constraint layout that is being forced on Android programmers.
The big shock is that the layout is all done in code. You write Dart statements to build your UI. There isn't an XML or XAML equivalent and there certainly isn't a drag-and-drop designer. This might be fine, but in my tests the edit-compile-run loop was far to slow to make it possible to design a sophisticated UI quickly.
You may not like drag-and-drop editors but if Flutter is to attract beginners it needs one.
You can use it via a plug-in for Android Studio, Intellij or Visual Studio Code. I tried it out under Android Studio and found the installation instructions to be less than clear. Perhaps one day Android Studio will come with a built-in Flutter option, but for now set aside some time to install it. When you do have it installed be prepared to wait for the first compilation. It is slow, even compared to Android. Recompilation is faster, but still not really fast enough. This is a significant problem.
At this point you might think that the verdict is in and Flutter is more a dead leaf than a butterfly, but no...
It is true that at the moment I wouldn't give up Android native in Kotlin for Flutter, even though it has problems. I also wouldn't give up using Cordova for cross-platform, even though this too has problems - but I will still be keeping an eye on Flutter.
The first reason is that Google seems to be using it internally and this means Flutter has more of a future than you might think. Google's Fuchsia operating system also runs Flutter apps natively - whatever that means. Android is a huge, overdeveloped mess and after ten years Google might well have its eye on a replacement. Perhaps getting a lot of Flutter apps out there would make Fuchsia adoption easier.
Yes, if Google does manage a second hit OS with Fuchsia, Flutter will be in there somewhere - but this is a long way down the road, and years not months.
In the meantime it is worth noting that Flutter Desktop is in the early stages for Windows, MacOS and Linux. There are even instructions to get it running on a Raspberry Pi. It might be that with sufficient support this might be an interesting way to create apps.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Thursday, 06 December 2018 )|