Cross-platform mobile apps with Flutter
If you are developing mobile apps using cross-platform development tools like React Native, Phonegap or Xamarin, you now have a new option for cross-platform development — Flutter.
Features of Dart :
- Dart support Ahead Of Time compilation (AOT). This improves app performance and startup time.
- Dart also support Just In Time compilation (JIT). This allows for hot reloads of Flutter app.
How does it work
Instead of utilizing web view or relying on the device’s OEM widgets, Flutter renders every view component using its own high-performance rendering engine. This allows building applications with native-like performance characteristics. The engine’s C/C++ code is compiled with NDK on Android and LLVM on iOS. Any Dart code is AOT-compiled to native code during compilation.
Flutter app is composed of Widgets (Stateless or Stateful). These Widgets are rendered onto a Skia canvas and sent to the platform. The platform shows the canvas and sends events back.
Flutter provides platform specific shell. Dart VM is hosted inside this shell and provides access to the native platform APIs. The shell also provides communication to the relevant IMEs (e.g. Keyboard) and the systems application lifecycle events.
The engine’s C and C++ code is compiled with Android’s NDK or iOS’s LLVM. The Dart code (both the SDK and the App code) is ahead-of-time (AOT) compiled into native ARM library. This library is included in “runner” Android/IOS project, and combined into .apk or .ipa. When launched, the app loads the Flutter Library. Any rendering, input or event handling is delegated to the compiled Flutter and app code.
The Flutter framework contains everything you need to develop an app. Flutter apps look like native iOS or Android application, simply by using the right themes. Cupertino is a theme for iOS, and Material is a theme for Android.
Flutter updates the UI at 60fps mostly using GPU. Widgets written in Dart are compiled to native widgets that are directly connected to Native SDK. There is no need for middle layers like bridge in Phonegap. Flutter directly renders widgets on Skia canvas within its engine running on the native platform.
Google’s Flutter makes the app development process easier. People who used to develop cross-platform apps should give it a try.
Thanks for reading. If you enjoyed this article, feel free to hit that clap button 👏 to help others find it.
This article is a part of the series of articles related to mobile technology. If you are looking for a Mobile app development team to build your solution, please contact us at email@example.com.