Flutter 2

With more than 2 million users and counting (according to Google), Flutter is one of the most widely used open-source UI software development toolkits by Google. Initially released in 2017, Flutter supports all the major platforms, including Windows, macOS, Android, iOS, Linux, and web. 

 Flutter 2.0

Source: Flutter

On March 3rd, Google unveiled Flutter 2.0, an upgrade to the initial version. While the version comes with a spread of new features, the focus remains to be Flutter’s constant transition from traditional platforms like mobile to support apps everywhere, including desktop, web, and form factors like foldable. Therefore, you can now hire Flutter developer for developing cross-platform applications.

Let’s discuss the highlights of Flutter 2.0, how it’s different from the initial version, and how it’ll impact Flutter app development.

Flutter 2.0: what’s new?

With the Flutter 2.0 upgrade, Google has tried to achieve two feats. First, it has maximized the features of Flutter, and second, it has extended beyond mobile to support apps for web, desktop, and foldable devices. Futter 2.0 allows you to use a similar codebase for shopping apps to iOS, Android, Windows, Linux, and macOS. 

Besides, it provides web experiences for Chrome, Firefox, Safari, and Edge browsers. You can also embed Flutter 2.0 in smart home devices, TVs, cars, thereby offering a truly pervasive and portable digital experience. 

The new release includes several new features and upgrades. Let’s quickly drill them down. 

1. Desktop support

Google has been trying to bring Flutter desktop to better quality to ensure that it provides a native text editing experience on all supported platforms. In this release, Google has incorporated Text Selection Pivot Points to try Flutter’s desktop support as a deployment target for all Flutter-based applications. 

In addition, Google has introduced a built-in context menu to the TextFormField widgets for Material and Textfield and Cupertino design languages. The ReorderableListView now comes with grab handles that make moving things around effortless for the developers. Another enhancement is an updated scrollbar, which displays the desktop-form factor and incorporates the drag-drop-display functionality. 

Google has also updated docs to help developers with desktop apps. The new upgrade comes with command-line argument management for better desktop-specific functionality. It allows you to double-click a data file to open the file in your app. 

2. Web support

One of the most significant declarations in Flutter 2.0 is the support for production quality Flutter web app development. While Flutter had a web foundation earlier, it was essentially document-centric. Now, the platform allows sophisticated web apps using paint APIs and hardware-accelerated 2D and 3D graphics, thanks to the circulation of plentiful platform APIs.

XDA

Source: XDA

The web support provides an app-focused framework that offers everything you can expect in a modern web solution. The following app scenarios are included in the initial Flutter 2.0 release:

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

Google has added a CanvasKit-based render built with WebAssembly to enhance the performance of their rendering precision. They’ve added web-specific features like text autofill, routing, PWA manifests, and address bar URL control. Flutter 2.0 also comes with a Link Widget which adds web app-like performance and experience to mobile apps running in a browser. 

3. Extended portability

As discussed, the primary focus of Google with Flutter 2.0 release is to extend its portability beyond the conventional Flutter app development for mobile and web. Google has highlighted three collaborations to demonstrate Flutter’s extended portability. These include:

  • Foldable android devices

    Microsoft will enhance its Flutter support. Currently, Microsoft provides premium quality Windows support in Flutter. Now, the company will increase its support to foldable Android devices. These devices require applications that can offer side-by-side experiences to leverage dual-screen nature.

  • Flutter desktop

    As mentioned, Google has extended Flutter to desktop. To achieve that, the company has partnered with Canonical to support Flutter app development and deployment on Linux. Canonical is looking forward to providing rich experiences across hardware configurations, with Flutter being their main choice for desktop and mobile applications.

  • Infotainment systems

    Toyota, one of the world’s leading vehicle manufacturers, announced that it’d be bringing digital experiences to its cars by adding infotainment systems based on Flutter. Some reasons why Toyota chose Flutter were high performance, consistent experiences, quick iteration, and developer ergonomics.

4. Flutter folio

Google has extended full support for three platforms – Android, iOS, and Web, while macOS, Windows, and Linux are in beta. However, a question that arises is how developers will be able to write an app that changes itself to various input modes, idioms, and form factors. To answer this question, Google has authorized the Flutter Folio scrapbooking application. 

5. Add-to-app

Developers can now add Flutter to their existing mobile apps. Google has released an Add-to-App feature that lets you reuse the Flutter code across iOS and Android and at the same time store your existing native codebase. The APIs that enable this are indexed on Flutter.dev along with sample projects that demonstrate the new pattern. These APIs are in the beta channel, and this change allows developers to add various precedents of the Flutter engine in native applications. 

6. Flutter fix

Another crucial addition to the new version of Flutter is the Flutter fix. It incorporates multiple things, including:

  • Numerous accessible fixes packed with the Flutter SDK
  • Exclusive command-line option to Dart Fix
  • Updated Flutter extensions for Android Studio IDEs, the VS Code, and IntelliJ

7. Google mobile ads 

Google has also declared the beta launch of Google mobile ads SDK for Flutter, which works with AdManager and AdMob. It supports various ad formats, such as native, banner, interstitial, and video. Earlier, Google revealed this SDK with Sua Musica, a major music platform in Latin America. Now, the company is opening the SDK for widespread adoption. 

Google also announced updates to Flutter plug-ins for a wide range of Firebase services, like Cloud Functions, Cloud Messaging, Authentication, Cloud Storage, Crashlytics, and Cloud Firestore. The company has incorporated an update of the Cloud Messaging Package, along with including support for sound null safety. 

8. Dart 2.12

Dart, the sauce behind Flutter, has also received an upgrade as Google launched Dart 2.12 with sound null safety support. The sound null safety offers two benefits:

  • It attenuates null reference exceptions.
  • It provides assurances at runtime and development. 

Furthermore, this update comes with a rational application of the foreign function interface (FFI). This enables developers to write code that interoperates with:

  • New profiler tools written with integrated developer and Flutter
  • C-based APIs
  • Performance and size enhancements

9. DevTools

Google has taken a step further by enhancing the production quality of Flutter DevTools. The capacity for Visual Studio Code, Android Studio, and IntelliJ helps developers alleviate their problems. You can now see a picture at a higher resolution than shown, allowing you to track app size and extra memory use. To turn on this feature, you need to visit the Flutter Inspector and Allow the Invert Oversized Images. In addition, you can display fixed layouts, which will enable you to debug all layout types. 

Some other new features introduced in Flutter DevTools 2.0 are:

  • ‘Performance view is changed to ‘CPU Profiler’ to specify its functionality
  • ‘Timeline’ view is changed to ‘Performance’ to specify its functionality
  • New memory view charts for seamlessly explaining activities 
  • Search and filtering options in the Logging tab
  • Average FPS data and usability enhancements added to the Flutter Frames Chart
  • Track logs form to see complete logging history
  • Trimming grid added to CPU Profiler flame charts
  • Unsuccessful network requests with red error labels in the network profiler

What did Google say?

According to Google, the idea behind launching Flutter 2.0 is to bring a paradigm shift to how developers think about Flutter web app development. They want the developers to think about the experiences they’re creating and providing instead of the platforms they’re targeting. 

Google also said that the new release would allow every Flutter developer to benefit from web innovations, such as comprehensive interfaces for application programming. These interfaces enable developers to develop highly sophisticated applications with flexible layouts and hardware-accelerated 3D and 2D graphics. 

Lastly, Google said that more than 150,000 apps on Google Play are built with Flutter, and after the free Flutter 2.0 upgrade, they want to target desktop and web. 

Shift to flutter now

For years, Flutter has been the preferred mobile app development toolkit for businesses, thanks to its cost-effective and highly scalable development capabilities. Now, with Flutter 2.0, Google has introduced a new generation of technology that’s a great fit for cross-platform app development. 

Some reasons why you should choose Flutter for app development are:

  • Reduced code development time
  • Increased time-to-market speed
  • Native app-like performance
  • Same UI across platforms
  • Seamless platform-specific logical implementation
  • Own rendering engine
  • Ability to go beyond mobile

Wrapping up

The Flutter 2.0 release for developers has introduced new opportunities in the fields of not only mobile development but also in web and desktop. If you want to develop high-performance, cross-platform apps for your business, hire Flutter developer from TriState Technology to avail of the true potential of Flutter 2.0.