The revolution of cross-platform development or hybrid app development started with the introduction of Xamarin in 2011. This was followed by Ionic in 2013, React Native from Facebook in 2015. The recent development in this space is Flutter from Google.
Each of the hybrid application development frameworks was built around a programming language. For instance, Xamarin supports C# and React Native was built for Javascript. Likewise, Flutter, the frontend development framework uses the Dart programming language to build apps.
Flutter
Flutter is Google’s toolkit that allows building native cross-platform apps with one programming language and single codebase. It is free and an open-source project, with thousands of contributions from Google and the community.
The first version of Flutter was known as Sky, which ran on Android systems and the project was known as Sky Engine. At that time, it was a mysterious prototype, allowing hot reload of the executable on Android systems.
In May 2017, the beta release was made public. Flutter 1.0 was released on December 4, 2018, at the Flutter Live event in London by Eric Seidel, who is the lead developer of the project, denoting it as the ‘first stable version’ of the framework. Flutter 1.2 was released on February 2, 2019, and the latest stable release Flutter 1.9 was on September 10, 2019. Know What’s New in Flutter v1.9
Flutter consists of a modern react-style framework, a mobile-first 2D rendering engine (Skia), a set of ready-made widgets and development tools that combines together to help us in designing, building, testing and debugging our app. It helps us to build full-featured apps including geolocation, camera, storage and network etc., It neither uses WebView nor the OEM widgets that get shipped along with the device, instead, it uses a high-performance rendering engine that ships its widgets.
Flutter implements the ‘hot reload’ development cycle, that works by injecting updated source code files into the running Dart VM. It includes adding new classes, methods and fields to existing classes, and also changing existing functions but does not include static field initializers and global variable initializers and the main method of the app.
Flutter provides plugins support for Android Studio, VS Code and IntelliJ IDEs.
Dart
Dart first appeared on October 12, 2011, at the GOTO conference in Aarhus at Denmark and was originally designed by Lars Bak and Kasper Lund and developed by Google. Dart v1.0 was released on November 14, 2013, and the Dart v2.0 was released in August 2018 and the latest stable release, Dart v2.5 on September 10, 2019.
ECMA International has approved Dart as a programming language that can be compiled to JavaScript, which will work effectively in any modern browsers in its standard ECMA-408. The ECMA is a short-form of the European Computer Manufacturers Association and is a standards organization for information and communication systems, which was founded in 1961, in Europe, which aims to standardize the use of information communication technology and consumer electronics.
The Dart team has come up with a Dart pad, which is an online code editor that provides an easier way to learn Dart in 2015.
Flutter uses this programming language, Dart, and is used to build mobile, web, desktop and backend applications. Dart is an optimized programming language, used to build cross-platform apps. It is an object-oriented programming language, which uses C syntax and trans-compiles optionally into JS. It is a highly typed defined and supports mixins, interfaces, abstract classes.
Dart code can be compiled as either standard JavaScript or AOT and or stand-alone. On Android, Flutter runs in the Dart virtual machine which features Just-in-time (JIT) execution and on iOS, Flutter app uses ahead-of-time (AOT) compilation, as the App Store restricts n dynamic code execution.
Flutter Framework
The framework consists of two sets of widgets, namely the Material Design widgets which implements Google’s design language and Cupertino widgets which implements Apple’s iOS designs. It has a unified object-model called widgets, that combines the views, controllers and other properties into one.
Widgets
In Flutter everything is a widget and they are the building blocks of Flutter Application. The UI design in Flutter involves either putting together off the widgets or creation of the widgets.
Widgets form a composition based hierarchy such that, every widget nests inside, and inherits properties from its parent. Every widget can be declared as a structural element, stylistic element and also as an aspect of layout elements.
Advantages of Flutter
- It helps the brands to be easily recognizable in one go, by making a strong impact on their brands and their marketing dreams easily achievable, as it can provide the same user experience, look and feel for both iOS and Android Users.
- It can reduce the app development costs for companies, as flutter uses the same codebase for both android and iOS.
- Learning flutter is comparatively easy when compared to learning other programming languages. It makes, even a new member to be productive faster. In order to learn Flutter, no mobile experienced is required.
- It allows us to use responsive design techniques, that help us to adapt our app in various screen ranges.
- It provides ‘Safe Area’, which takes into account of curved corners and also on the ‘notches’ on the latest phones.