93 318 54 36

Google launches Flutter 2: What's new 

02/12/2022
Elizabeth De Leon

Google has released version 2.0 of Flutter, an open source UI development kit that allows app creators to create cross-platform apps. The update highlights an entirely new suite of features and improved portability of Flutter to support applications across multiple platforms.

Flutter 2: A complete overview

web support

Flutter's high-end web support is the biggest statement at the Flutter 2 launch event at Flutter Engage. Previously, the foundation of the web was mainly focused on documents. Now, rich platform APIs make it easy to develop sophisticated applications using paint APIs, hardware-accelerated 2D and 3D graphics, and flexible layout.

Flutter 2 offers stable web support that provides the same web experience you would get on a mobile device. Mobile app development services experts can create apps for Android, iOS, and the browser using the same code base. It's possible to compile existing Flutter codes written in Dart into a great web experience because, with Flutter 2, the web is just another target device for your app.

The new version focuses on 3 application scenarios:

  • Single Page Application (SPA)
  • Progressive Web App (PWA)
  • Bring existing Flutter-based mobile apps to the web and deliver the same experience

Flutter does not transfer to the HTML equivalents of its widgets. Rather, the Flutter web engine offers a choice between two renderers:

  1. A CanvasKit renderer that uses WebGL and WebAssembly to render Skia paint commands on the browser canvas
  2. An HTML renderer that is optimized for wide compatibility and size

A Flutter Plasma demo was also created to show the ease of creating a sophisticated web graphics experience with Dart that can run seamlessly on mobile and desktop devices.

The community has also added some web-specific features, such as text autocomplete, PWA manifests, and control over routing and address bar URLs.

desktop stand

It is still in beta state, the stable version may be released later this year. However, let's take a look at what it has to offer.

For desktop browsers, the community has added keyboard shortcuts, interactive scroll bars, support for screen readers for easier access on Chrome OS, Windows, and macOS, and improved the default content density in desktop mode.

Google has made several improvements: bringing Flutter desktop to high quality, ensuring text editing offers a native experience on every supported platform, integrating critical features like text selection pivot points, etc. It has also added a built-in context menu to the TextField and TextFormField Widgets for Cupertino and material design languages. Grab controls are added to the ReorderableListView widget.

The updated scrollbar widget provides several attractive features that you can use on the desktop. Flutter 2 also allows command line argument management for Flutter applications. That way, things like double-clicking a data file in Windows File Explorer can be used to open a file in the app.

Flutter correction

Flutter Fix is ​​a collection of several things. It has a unique command line Dart CLI tool known as Dart Fix. It is useful to search the list of deprecated APIs and update the code with them. It also allows access to the list of accessible fixes included with the Flutter SDK.

Additionally, it has an updated set of Flutter extensions for Android Studio IDE, VScode, and IntelliJ that can present a similar list of accessible solutions and help developers change codes simply using the mouse.

Extended portability

Google highlights 3 recent teams that feature Flutter's maximized portability.

First of all, Microsoft will expand its support for Flutter. Along with the recent collaboration to deliver premium Windows support in Flutter, Microsoft will also contribute to the Flutter engine that makes it easier to develop apps for foldable Android devices.

Secondly, Canonical partners with Google for bringing Flutter to the desktop. You will support the development and deployment of applications on Linux. Canonical promises to offer an excellent experience on various hardware configurations.

Lastly, Toyota, a leading vehicle manufacturer, stated that it has adopted some innovative strategies to bring a next-generation digital experience to cars by creating various Flutter-enabled infotainment systems. Toyota sought to hire a Flutter developer because of Flutter's smartphone-level touch system, rapid iteration, developer ergonomics, and consistently high performance. Flutter's integrated APIs will allow Toyota to customize Flutter and meet the requirements for building cutting-edge infotainment systems.

Add to app

Flutter 2 aims to reduce the workload of developers in any app development agency while ensuring high-quality results. Add-to-App is yet another feature to highlight that goal.

Developers can add Flutter to an existing Android or iOS app. The Add to App feature is a great way to reuse Flutter code across both platforms while storing the current native database. With this change, Google suggests a possible integration of the Flutter engine into native applications.

flutter folio

As we already mentioned, Flutter is now compatible with 3 platforms: Android, iOS and web, and 3 more in beta: Windows, Linux and macOS. How is it possible to create an application that switches to multiple forms (small, large and medium screens), multiple languages ​​(web, mobile and desktop) and multiple input modes (keyboard, mouse and touch)?

Flutter Folio gives an answer to this question.

Flutter Folio is a scrapbooking app designed to introduce Flutter's capabilities for creating apps that run smoothly across all platforms and devices: Android, iOS, Mac, Windows, Linux, and the Web. It's a perfect example of a responsive app, created in collaboration with gskinner and the Flutter team.

Flutter DevTools

Flutter DevTools is used to debug Flutter applications. Introducing a new feature that targets any issue even before starting DevTools is the ability for IntelliJ, Android Studio, or Visual Studio Code to notice whenever there is an exception and offer to present it to DevTools to start the debugging process.

While running DevTools, new error badges in the tabs help track various issues in the application.

In DevTools, another new feature has been added that allows you to easily view an image at a higher resolution than what is displayed. Helps reduce extra memory usage and application size. Developers can allow Flip Large Images in Flutter Inspector to enable this feature.

Google has also added the ability to display sticky layouts. This allows developers to debug different types of designs.

Other features available in Flutter DevTools 2 include the following:

  • The Performance view is now called CPU Profiler. Similarly, the timeline view is renamed to Performance. The changes highlight the functionalities they offer.
  • The new memory view graphs are smaller, easier to use and faster. It incorporates a new hovercard that explains the activities at a specific time.
  • Search and filtering functionality is added to the Registry tab.
  • Average FS data and various usability improvements are included in the Flutter Frames graph.
  • The timing grid is included in CPU Profiler flame charts.
  • The tracking logs form is launched so that developers can check the total log history when they launch it.
  • Failed network requests will be called in the network profiler for an instant fix.

Google Mobile Ads for Flutter

Google announces beta launch of Google Mobile Ads for Flutter. The new SDK works well with AdMob and AdManager to deliver different ad formats, incorporating banners, native video ads, interstitials and rewarded.

Google has also announced several updates to Flutter plugins for key Firebase services such as Cloud Messaging, Cloud Firestore, Cloud Function, Authentication, Cloud Storage, Crashlytics, integrating support for null sound security, as well as an update to the Cloud Messaging Package .

Dart 2.12

This is another important revelation from Google. Dart 2.12 supports sound null safety. It has the potential to eliminate any null reference exceptions. That way you ensure at development and runtime that types can only contain null values ​​if a developer expressly selects it.

The update also includes a consistent implementation of FFI (foreign functions interface). Allows developers to use the dart:ffi library to call native C APIs.

time to finish

As you can see, Flutter 2 brings some innovative changes in the scope of app development. The line between using a web and a mobile app is gradually blurring in favor of offering a great user experience across multiple platforms and devices. If you're looking to go with the flow, it's time to build an app with Flutter 2!

Do you need to update your website?

Do you need any of our web design services? In IndianWebs We have extensive experience, and a team of programmers and web designers in different specialties, we are capable of offering a wide range of services in the creation of custom web pages. Whatever your project is, we will tackle it.