Flutter | The Comming future
Google Flutter has only been available since 2017 but it is making waves because it takes a different approach to cross-platform mobile app development.
Introduction to flutter
Google Flutter has only been available since 2017 but it is making waves because it takes a different approach to cross-platform mobile app development. Google is currently working on the successor to its Android operating system called Fuchsia and it is writing it using Flutter. So, Flutter is very important to Google.
You write user interfaces using Google Flutter user interface widgets, not the native iOS or Android UI widgets shipped with their retrospective SDKs. A Flutter app made using Flutter Widgets will look exactly the same on iOS as it does on Android because it will use the same Widgets from the same library. Flutter comes with many widgets, including those that mimic Google’s Material look & feel and those that mimic Apples iOS look & feel.
Google Flutter uses its own high-performance rendering engine to draw these widgets and they have been designed to work on all mobile platforms. Also, these widgets are extendable.
You write the application code in Google’s Dart language and it is compiled ahead-of-time into machine-code for native-like performance, thus offering a performance advantage over React Native.
There is no bridge between the user interface and the application code.
What is Flutter?
Flutter is Google’s mobile SDK / UI framework that enables developers to build native apps that run on Android and iOS devices. Developers write code in a single codebase that works on both platforms.
Dart is a general-purpose programming language which was created by Google in 2011. Like Java and C#, it has a similar syntax to ‘C’.
Unlike conventional languages, Dart has been optimized to be deployed to run on a variety of platforms:
Within a Web Browser
You can try out Dart in your web browser by Navigating to https://dartpad.dartlang.org/. You can write your own code or run the sample code. See the ‘Sunflower’ sample below.
As Interpreted Application
The Dart SDK includes a Virtual Machine. A virtual machine is a sandbox in which code may run without directly communicating with the underlying operating system. This enables Dart code to be invoked from the command-line, using the ‘dart’ command-line tool in the SDK. This code is compiled on demand just-in-time as it runs.
Using Dart in this way is a great way to write server-side applications and it performs at a similar level to Java / .Net.
Hot Reloading / Hot Replacing
If the developer is running the Dart application in the Dart virtual machine from the command-line (interpreted), the JIT compiler can reload the code when the underlying source code changes, often while preserving the application state (variables) whenever possible. So, the developer can write and run the code at almost the same time. This makes application development very fast indeed. Yet at the end of the development process, the code can be com piled using the ahead-of-time compiler and deployed as a native application.
Flutter Development (Debug Mode)
When you are developing a Flutter Application, most of the time you run it in Debug Mode and the code is JIT compiled & interpreted. This mode is known as ‘check’ or ‘slow’ mode. Under this mode, the assertion functions, including all debugging information, service extensions, and debugging aids such as “observatory,” are enabled. This mode is optimized for rapid development and operation, but not for execution speed, package size, or deployment.
Once your app is written you can build it to run in Release Mode as a native application and it will perform much better.
As Native Application
Dart code can be compiled ahead-of-time so that the code may be deployed as machine-code.
Flutter was mostly written using Dart and runs natively. This makes Flutter fast, as well as customizable (as the Flutter widgets were written in Dart).
It is Free and Open.
Flutter is free and Open Source.
Fuschsia is Google’s next Operating System for mobile devices. All of the apps for Fuschsia are being developed by Google in Flutter.
Flutter Source Code
Google Flutter is open source and it comprises of several repositories hosted on GitHub here: