My thoughts on Flutter
In May of 2017, Google released a new toolkit called Flutter allowing developers to build natively compiled apps for mobile, web, and desktop using a single programming language, Dart. Before we get to my thoughts on Flutter, let’s take a brief overview of what this toolkit offers.
The toolkit
Flutter’s toolkit is a combination of an SDK and a framework which allows the developers to compile Dart code into native code and develop apps quickly by using built in widgets (or UI elements).
SDK
The Flutter SDK (software development kit) is a collection of tools that is responsible for compiling (or translating) your Dart code into native code for each of the supported platform. This allows developers to build and deploy apps for Android, iOS, web and desktop using a single codebase. It is also important to note that at the time of this writing, support for the web and desktop is limited, and is not ready for production use, but Google is working to release new updates quickly.
Framework
The Flutter framework provides a set of utility functions to add widgets to the Flutter app. The framework also provides a set of nicely designed Material Design (Android) and Cupertino (iOS) widgets to allow developers build apps according to each platform’s design language and differences.
Dart
Dart is the programming language which connects the Flutter SDK and framework together. It is a strongly typed programming language, and has special features needed to allow the compilation to native code. Flutter uses Dart’s AoT (Ahead of Time) compilation feature to compile both the SDK and the app code into native code for each of the supported platforms. Additionally, Dart can also be JiT (Just in Time) compiled, which enables Flutter stateful hot reload feature so developers can test their changes within milliseconds! If you would like to learn more about Flutter and Dart, I would suggest you checking out Why Flutter Uses Dart by Wm Leler.
Widgets
Flutter apps are composed of widgets, very similar to React, which can be nested into one another. For example, a very minimal app would have a Scaffold (screen) which could contain an AppBar, and a Container. The Container could contain a Row which would contain other various widgets like Text, Image, etc. This tree of widgets keeps growing and growing, and the tree can be massive for a full feature rich app. These widgets describe what their view looks like depending on their current configuration and state. When the widget’s state changes, it will automatically rebuild its description to update what the view looks like. Flutter will also compare the description from the previous state description, and will only make the needed changes to reflect the new view from one state to another.
My thoughts
In this section, I will be outlining the pros and cons of this toolkit, from my standpoint. One of the biggest advantage of Flutter, in my opinion, is that it allows you to build cross platform apps for nearly every platform, which significantly speeds up the development process as there is only a single codebase that needs to be maintained. The other advantage is that Flutter has great performance and is almost identical to those developed using native programming languages. In addition, Flutter is also open source which means that customization to the Flutter toolkit is endless, and will always keep growing as more and more individuals start contributing.
However, because everything has its drawbacks, Flutter is no exception here. Flutter may have a steep learning curve for some individuals who are new to programming, especially since Flutter uses Dart which is a new language to learn for most people and to make matter worse, as of right now, there is only limited online Dart resources available and community support. Also, because Flutter is relatively new to the game, it can be unstable and buggy at times. Additionally, as both Apple and Google continue to release new updates to their OS and adding new features/UI elements, Flutter may have difficulty keeping up with them. Finally, it is also to note that Flutter apps cannot be smaller than 4.06 mb. This may be a big deal for some, but I personally believe if your app is tiny, you are probably better off writing code natively, anyway.
Conclusion
Flutter might be new to the game, but overall it is a great tool to learn, especially for single developers or new startups who do not have the budget or resources to maintain several codebases. It has great cross platform support and capabilities, excellent performance, and the possibilities of what you can build with it is endless, all with a single codebase! If you are looking to try out Flutter on your own, I highly recommend referring to the official documentation as it has great resources and tutorials, and most importantly, it is always up-to-date.