What you need to know about Flutter
What you need to know about Flutter
Unless your head has been in the clouds, you’ve likely heard of Flutter or breezed past it while furiously interrogating StackOverflow. In this article, we are going to get a bird’s-eye view of Flutter; covering some of the core concepts and discuss some considerations if you’re thinking about using Flutter for your next project.
What is Flutter?
Flutter is a high-performance mobile SDK that is supported by Google and the open-source community. The Flutter SDK allows developers to create Android, iOS, and (beta) Web applications from a single codebase.
Flutter automatically emulates the nuanced behaviors of the desired build platform. Because of this, apps look and feel just like native Android and iOS apps to its users; scrolling, navigation, and element padding are just a few of the emulated behaviors. Due to Flutter’s unique widget library, it’s very fast!
How does Flutter work?
Everything is a widget! This is one of the guiding principles of Flutter. Styles, Structural Elements, and even layout properties such as padding are widgets. Below, look at two examples of common widgets which are used in the layout of an app.
Instead of creating a bridge between the platform(s) widgets – iOS or Android – and the application, Flutter contains a set of proprietary widgets for each platform. Flutter compiles these widgets down to native ARM-compatible code at runtime using the Skia engine and C++.
Which IDEs support Flutter?
Yes. The officially supported IDEs for Flutter development should come as no surprise.
I’ve found IntelliJ IDEA to have the best support for Flutter. Although Android Studio is VERY similar to IntelliJ, all of the Android-specific tools, menus, buttons, etc…that are in Android Studio are distracting when I’m trying to get into a coding flow.
Do we really need another SDK for cross-platform apps?
From an architectural standpoint, Flutter is closer to ReactNative than Ionic. Just like Flutter, ReactNative uses a set of pre-compiled widgets. Yet, ReactNative still requires the bridge.
Because Flutter compiles native widgets at runtime, apps benefit from a boost in performance as well as stability. It is important to note that the minimum application size of a Flutter project is relatively large as the widgets are built-in. Additionally, Flutter applications require much less platform-specific code than the typical cross-platform app built with Xamarin.
Should I use Flutter for my next project?
Even though Flutter is a highly capable SDK, it is not without drawbacks. Consider the following notes when decided if you should use Flutter as your app development tool:
- Flutter does NOT have direct access to platform-specific APIs in the same way that a JS bridge does. Instead, a different approach which uses a publish/subscribe interaction to pass platform data to/from Flutter. This can get fairly complex – read more in the Flutter documentation.
- Password autofill does not work automatically with Flutter. This is mainly due to the proprietary widgets that Flutter uses. Since Android and iOS platforms are designed to work with their specific text field widgets and Flutter does not use platform APIs.
- Limited support for WatchOS
- Web builds are not fully supported – Project Hummingbird
- Cannot yet build Flutter as desktop apps
Ready to create your first Flutter app? Check out our First Flaps with Flutter guide.
Where is Flutter headed?
According to Flutters 2019 roadmap, the Flutter team continues to work on improving performance, tooling, ease of adoption and expanding to platforms beyond mobile.
Specifically, in 2019 the community is working to support web and desktop app builds from the same codebase as mobile apps.
I for one, am excited to be along for the ride as Flutter accelerates for take-off.