What is Flutter?
Flutter is a free and open-source mobile UI framework created by Google and released in May 2017. In a few words, it allows you to create a native mobile application with only one codebase. This means that you can use one programming language and one codebase to create two different apps (for iOS and Android).
Flutter refers to two important things:
- An SDK (Software Development Kit): A collection of tools that are going to help you to develop your applications. It includes tools to compile your code in native machine code (code for IOS and Android).
- A Framework (UI Library based on widgets): A collection of reusable UI elements (buttons, text inputs, sliders, etc.) that you can personalize for your personal needs.
To develop with Flutter, you will use a programming language called Dart. It’s also Google’s language created in October 2011 but improved a lot these past years.
Dart focus on front-end development; you can use it to create mobile and web applications.
Why you should learn Flutter?
User Interface Widgets
Flutter is written from the ground up. Unlike React Native and Xamarin, Flutter does not pay any toll when communicating with the native world. This means that every single control/widget in iOS and Android is created from scratch in the Flutter framework. This allows Flutter to run at 60 FPS and provide a great user experience.
This also means that when Apple refreshes its controls for the next iOS version, Flutter’s team will have to update their widgets to accommodate the changes.
One of the arguments against Flutter is that it uses Dart, and if you learn Dart, then you will only use it to create Flutter apps. I don’t see that as a disadvantage. I strongly believe that you should use the right tool for the job. This means if you have to learn Dart in order to create Flutter apps, then learn it.
Learning is fun and one should spend time to become a lifelong learner.
Flutter apps can be written in any code editor, but the two preferred ones are Android Studio and Visual Studio Code (VS Code). I use VS Code because it is lightweight and fast. VS Code also has a lot of plugins for Flutter, which allows you to be more productive during Flutter development.
The built-in command-line tools also allow you to run Flutter apps simultaneously on multiple devices. This is an extremely handy feature, as you can see side by side how your app will look and function on iOS and Android platforms.
The whole idea of writing a piece of code and then waiting for the simulator to launch to see the changes is tiring. Flutter solves this issue with the hot reload feature. Keep in mind that this is not a new feature and it was already available in React applications.
Hot reload really changes the way you build user interfaces in Flutter. The ability to update code and visually see the changes applied instantly allows the developers to quickly go through different iterations in much less time. This increases productivity, which results in higher-quality products.
Once you have experienced hot reload, it will be hard to go back.
One Code Base
Flutter is truly a single-code base, cross-platform framework. This means you write code once and it works on iOS, Android, and even the web.
One big misconception about developing in Flutter is that you have to target the look and feel for iOS and Android separately. If you follow this approach, you will end up with twice the work. When creating Flutter apps, it is advisable to create one single interface that works for both platforms.
Flutter has the most vibrant, diverse, and helpful community that I have been part of in my 15-plus years of professional software development. I am part of the Flutter Discord channel as well as a few Facebook groups, and I have always felt welcomed by the members of the community.
Apart from an amazing developer community, Google spends time promoting Flutter by organizing fun events. This includes hackathons, workshops, and even events to showcase your projects.
As an active member of the programming community, I feel that the strength of the community is of great importance. When you are programming in a particular platform, you become part of that community. It becomes your go-to place to find answers and share knowledge. An active community is the life and blood of the platform and a well-nourished community attracts new developers.
Flutter is a great platform to build cross-platform mobile apps. There is a great community behind the framework and Google is continually updating it. I am really excited about the future of Flutter and how it can simplify and unify mobile development.