Flutter is one of the newer frameworks for developing cross-platform mobile applications. In its 5 years of existence, it has grown into a mature, full-featured development kit that rivals and, for the most part, exceeds others that have been around the same time or longer, such as React Native and Xamarin. Flutter has a large user base and has grown in popularity substantially. According to Google Trends, it finally broke away from React Native as a search term in early 2020.
“Native” vs. Native
It is important to understand the distinction of the multiple uses of the word "native" when it comes to mobile development.
- "Native" has a native look and feel
- Native compiles to native code
Declarative vs. Imperative
Flutter, similar to React Native, makes use of declarative as opposed to imperative programming. If you're used to the more imperative style of programming (coming from a non-web background such as Swift, Objective-C, or Java in Android), this might be a bit of a "jump" for you. In simplest terms, think of imperative programming as the HOW I want the program to do something and declarative as the WHAT I want it to do.
The nice thing about declarative-based syntax, especially for UI development, is that there is a clear separation of concerns with how you want to interact with the user (both input and output) vs. what you want the application to do.
For those used to languages like Swift, Java, and C#, Dart should be a pretty familiar language. Some advantages of using Dart are...
- Provides a VM during development to allow for fast hot reloading.
- Syntax is geared toward fast UI development (similar to ECMAScript 6 in many ways)
Dart (and Flutter for that matter) provide a BSD-3 Clause licensing model. In a nutshell, it means you can use/modify/sell the code, but you have to give credit to the original copyright holder of that code somewhere.
Flutter has SDKs and toolchains that run on Windows, macOS, and Linux. If you are deploying apps to iOS, you must have a Mac with XCode installed. It is highly recommended that you go through the Getting Started section contained in Flutter's documentation to get acquainted with how things work.
Most of the tools that you use revolve around the "flutter" command-line tool. This includes package management, scaffolding, creating builds, etc. The two primary editors you can use are Visual Studio Code and Android Studio. I prefer Visual Studio Code, but both are pretty well supported for Flutter development.
Dart (and by extension, Flutter) has its own package management system. If you have used npm or yarn, this should be relatively familiar to you. As of this writing, Flutter has a thriving ecosystem with over 12,000 packages.
Given the popularity and support behind Flutter, it is a fine choice for most applications that need to be developed for both iOS and Android. In fact, there is even some experimental support for targeting macOS and web as well. So, while true native development is still the best option (if you want the richest experience on a given platform), Flutter definitely provides a compelling alternative that should reduce development time substantially as opposed to having to support multiple codebases.