Flutter 2.0: Everything you need to know


Flutter recently announced its 2.0 release, an upgrade from the initial version to supports all platforms. This version comes with a spread of new features and fixes which are extraordinary in their own way. New version has extended its mobile application services to everywhere including desktop and web. With Flutter 2.0, developers can use one codebase to adjust native apps to other operating systems from Android, iOS, macOS, Windows and Linux. Flutter can be embedded in home appliances, car and smart TV.
Let’s discuss what’s new in Flutter 2.0, and its notable features.

Null safety

Null safety has been in testing for the time being and it introduces types which cannot be null. While upgrading to Flutter 2.0 and migration, you can choose what is non-nullable and it helps to avoid unnecessary null checks.
Example:
int k = 5; // k is now non nullable
int? j; // Nullable variables need to be explicitly declared
k = null; // Error

Web support

The web support provides an app-focused framework and the following app scenarios are included in the initial Flutter 2.0 release:

  • Single Page Apps (SPAs)
  • Progressive Web Apps (PWAs)
  • Flutter mobile apps to web

Google has added a CanvasKit-based render built with WebAssembly and this approach has ensured better performance. In addition, they have added web specific features like routing, text autofill, address bar URL control and PWA manifest.

Desktop Support

Google has introduced a built-in context menu to the TextFormField widgets for Material and Cupertino design languages. They also incorporated Text Selection Pivot Points to desktop support for all Flutter based app. Flutter 2.0 comes up with command-line argument management to ensure better desktop-specific functionality. An updated scrollbar displays the desktop-form factor and incorporates the drag-drop-display functionality.

Flutter Folio

The main feature of Flutter 2.0 is adaptability and google has extended full support to iOS, Android and Web, while Windows, macOS and Linux are in beta. Google has authorized the Flutter Folio to demonstrate how developers can make changes to various input models, form factors and idioms.

Google Mobile Ads for Flutter

Google declared the beta version of Google Mobile Ads for Flutter. It works with AdManager and AdMob and supports various ad formats, such as banner, interstitial, native and video. There is an increased level of efficiency and possibilities for monetization of apps than previous setting’s.

Add-to-App

Google has released an Add-to-App feature and developers can now add Flutter to their existing mobile apps. This feature allows you to reuse iOS and Android code while maintaining the existing native codebase.

Flutter Fix

Flutter Fix serves to improve the framework and incorporates multiple things, including: Exclusive command-line option to dart fix, numerous accessible fixes packed with the Flutter SDK and updated Flutter extensions for Android Studio IDEs, the VS Code, and IntelliJ.

Flutter DevTools

Few other new features introduced in Flutter DevTools 2.0 are:

  • Performance view is changed to ‘CPU Profiler’
  • ‘Timeline’ view is changed to ‘Performance’
  • New memory view charts
  • Search and filtering options
  • Average FPS data and usability enhancements
  • Track logs form and Trimming grid
  • Unsuccessful network requests with red error labels

Being one of the prominent Flutter development companies in India, Techversant Infotech offers highly specialized, end-to-end Flutter app solutions with proven track record and best-in-class coding practices. Contact us to get free consultation: services@techversantinfotech.com