Google Releases Flutter 2 with Support for Different Platforms

Written by bacancytechnology | Published 2021/03/18
Tech Story Tags: flutter | flutter-for-mobile-app | flutter-app-development | flutter-trends | web-development | google | remote-developers | remote-development

TLDR Google Releases Flutter 2 with Support for Different Platforms. Developers can now use the same codebase for 5 platforms, including iOS, macOS, Windows, Linux, and Google’s own platform Android. Developers will be able to get embedded with smart solutions, such as smart TVs, smart home appliances, smart cars, etc. Google wants developers to consider the brand, user experience, modern elements, innovation, and other similar aspects rather than thinking about compatibility and a particular platform. Google paid extra attention to keeping the Flutter. 2 user experience excellent for all the platforms and browsers.via the TL;DR App

Not long before, no one had imagined using the same codebase for iOS and Android apps. But in 2018, Flutter was launched. It was around in beta version since 2015, but the official launch happened in December 2018. Since then, Flutter has grown from its ‘open-source mobile SDK for iOS and Android’ status. 
Flutter 2 - launched on March 3, 2021 - is much advanced than its legacy counterpart. It supports different web platforms, devices, and browsers. In this article, we will tell you what Flutter 2 is and how its compatibility is going to change the scope of development projects.

Google Flutter 2 – All support related Announcements Summed up:

Flutter 2.0 is a major upgrade that is continually-improving Flutter SDK. With this, developers can now use the same codebase for 5 platforms, including iOS, macOS, Windows, Linux, and Google’s own platform Android. Not just his, Flutter 2 now has the ability to get embedded with smart solutions, such as smart TVs, smart home appliances, smart cars, etc.
The beautiful, portable, and performance-oriented apps, created using Flutter, will also be able to be viewed across various standard browsers, such as Google Chrome, Safari, Mozilla Firefox, and Edge. Google paid extra attention to keeping the Flutter 2 user experience excellent for all the platforms and browsers.
Flutter 2’s release emphasizes building a more connected world with developers having no difficulty in porting their creating solutions. With this open-source UI development Kit, we can imagine having a vibrant digital landscape that focuses on providing a better user experience rather than investing a lot of time in making it platform-specific.
Before now, such wide platform-independent support was never offered for all kinds of developers and for all types of apps. With Flutter 2, professionals and enthusiasts will be able to use a single codebase for commercial applications.
This release can be considered at the transition of Flutter to a portal framework from the mobile framework. 
You can compare: Latest Flutter Version 1.22.1

Main Highlights of Flutter 2 Release in Detail

Flutter for Web:
The web support for Flutter revolves around the app-centric framework that Flutter is. Google wants developers to consider the brand, user experience, modern elements, innovation, and other similar aspects rather than thinking about compatibility and a particular platform. 
App scenarios that are into consideration in this initial release are:
  • PWAs, i.e. progressive web apps, for creating desktop apps like interfaces that can be used on browsers;
  • Flutter mobile apps to web platforms, for making the Flutter apps available for the web too;
  • SPAs, i.e. Single-page Applications, for apps with a single interface that loads/changes sections and data as users interact.
To optimize performance for the above, the following deployments were done: 
  • A new rendering engine that utilizes CanvasKit and WebAssembly;
  • Text autofill;
  • PWA manifests;
  • Address bar URLs and routing control.
Extending Flutter Support to desktops, embedded devices, and more
The digital landscape is no more limited to mobile devices and large-screens only. Therefore, Flutter 2 is stretching its support to embedded devices, foldable devices, and desktops alongside its mobile and web UI support. In the zeal to make Flutter portable, three partnerships are done. These are:
  1. With Canonical, in order to take Flutter to desktops.
  2. With Microsoft, the support for high-quality Windows to Flutter deployments will be continued as before;
  3. With Toyota, for building infotainment systems for vehicles and for taking Flutter to vehicles.

Upgradation of DevTools

Before announcing the production-quality Flutter 2 launch, Google worked to improve DevTools too. 
Now, basic exceptions, detected in the IntelliJ, Visual Studio, and Android Studio can be sent to DevTools debugging for addressing. The image-viewing capability for the high-definition images is improved too. By doing this, it allows developers to track the actual memory size being used by the application.
Overall, Flutter DevTools 2 has the following new features:
  • Logging tab now has searching and filtering capability;
  • CPU profiler (‘Performance view, formerly) frame charts now have timing grid too;
  • Red-error label for unsuccessful network profiler requests;
  • Timeline view is now ‘Performance’ view;
  • Frames Chart now have average FPS data and usability enhancements;
  • Tracking logs for DevTools is now made easy, as ‘Tracklogs form’ starts prior to DevTools.
Besides this, the latest memory charts are faster and easy-to-use. These charts are made compact and hover-cards are introduced for showing the details of timeline-based activities.
Updates made in Dart (Dart 2.12)
Dart is the main foundation that led Flutter towards portability and gave rise to Flutter 2. In case you don’t know, Dart is Google’s very own programming language for multi-platform development.
Google has also announced the latest update for Dart. From now, Dart will support sound null safety. This simply means that Dart 2.12 is capable of eliminating null reference exceptions, improving the performance of the apps, and ease for developers.
The Dart update also introduced FFI (foreign-function interface) that allows Flutter applications to consistently call native C APIs flawlessly. 
Google Mobile Ads for Flutter
The upgraded UI development SDK, Flutter 2 is compatible with AdManager and AdMob. With this, Flutter applications can run Google Ads in different formats. Native-looking ads, video ads for rewards, interstitial, and banners can be run through Google Mobile Ads for this SDK now.
Flutter Folio
As Flutter lets the same codebase work for multiple platforms and devices with varying screen sizes, your app requires adapting as per user devices. That’s why Flutter Folio is released. It is a scrapbooking application for all your devices.
Add-to-App functionality
It is a way to utilize your current native codebase for Flutter development. There are a few APIs, introduced for this purpose with Flutter 2. However, these are yet in beta mode. Using the Add-to-app feature, developers will be able to add Flutter to their current iOS or Android Apps through APIs support.

The Final Word

Flutter is free, open-source, growing, and opportunity-filled for developers as well as app owners. It saves app development and deployment time alongside your efforts. Flutter 2 has opened a new horizon for seamless platform-independent app development, taking a step forward towards an ambient computing world. It surely has a long way to go.

Written by bacancytechnology | Agile Coach and CEO
Published by HackerNoon on 2021/03/18