Flutter 3.0: Brief Summary of What is New
May 12, 2022
Guest User
Flutter
Engineering
Update
Summary
Flutter 3.0, released at Google I/O 2022, brings significant updates including expanded platform support, design enhancements, improved text input, and upgraded tooling. This version further solidifies Flutter's position as a versatile, cross-platform development toolkit.
Key insights:
Evolution to Flutter 3.0: Released on May 11, 2022, Flutter 3.0 introduced multi-platform capabilities.
Desktop Support: Includes support for macOS and Linux, in addition to existing Windows and web support.
Design Improvements: Integration with Material Design 3, supporting dynamic color themes and custom theme generation.
International Text Input: Full support for text input in languages like Chinese, Japanese, and Korean across all desktop platforms.
Dart 2.17: Introduced features like extending enums, customizing default functions, and reducing boilerplate code.
Flutter Web: Utilizes ImageDecoder API for faster image decoding and includes a new lifecycle API.
Foldable Phone Support: Features and widgets for foldable devices, enhancing dynamic user experiences.
Casual Games Toolkit: Tools and templates for developing casual games, indicating Flutter’s expansion into gaming.
Firebase Support: Integration of Firebase plugins and improved real-time crash reporting with Crashlytics.
Windows Upgrade: Recommended development on Windows 10 due to limited testing features on older versions.
What is Flutter?
Flutter is Google’s Cross-Platform app development platform used by developers globally. Using Flutter, you can create an Android or iOS web application, mobile application and desktop app all from a single codebase, saving you significant costs and time.
In short, you can create apps for Android and iOS with the same codebase. Flutter builds native apps which are written in Dart language. Dart is an easy to learn language and adds a lot of versatility to the Flutter platform.
The Road to Flutter 3.0
Google created Flutter on 4th December 2018 and released the first version Flutter 1.0, which would run on iOS and Android devices but had limited Web support, lack of third party integrations and huge file size. These problems paved the way for the release of Flutter 2.0 on March 4, 2021.
Flutter 2.0 allowed developers to develop apps on Android, Desktop and Web with the same codebase. Besides, it introduced Web Support across all platforms, Desktop support, null safety and integration of Google Ads in your app. While these updates were praised and gave way to over 450,000 Flutter apps on the Play Store, there still remained a need for Flutter to evolve from a mobile centric to a multiplatform tool.
Key Features of Flutter 3.0
The Highly Anticipated Flutter 3.0 version with multi platform capabilities was released on 11th May, 2022 as part of Google’s Annual Developers Conference (IO).
Desktop Support for MacOS and Linux
Previously, Flutter offered Web and Windows support for iOS and Android Devices. With Flutter 3.0, developers on the stable channel can now build desktop apps for macOS as well as Linux devices and receive support from Google’s team. Google paired with Canonical, developers of Ubuntu, who assisted in the Desktop support effort for Linux.
Moreover, due to Flutter having native support for Apple Silicon, it is now compatible with macOS desktop. Developers can now ship Flutter apps in the Universal Binary format, allowing them to run on both Apple Silicon and Intel based Macs.
You can now create platform-rendered menu bars on macOS using the PlatformMenuBar widget, which supports insertion of platform-only menus, and control over what appears in the macOS application menus.
These developments mean that Flutter is now accessible with six platforms namely:
iOS
Android
Windows
Web
macOS
Linux
Design Improvements to Flutter
As part of Android 12, Google launched the Material Design 3 which included the color theming engine, wallpaper based themes, and drafting the app’s color scheme. and It introduces other things too, including support for Material Design 3.
At IO 2021, it was announced that Flutter developers would be able to integrate Material Design 3 in their apps. This year, they have delivered and we can see Flutter 3 introducing variety to the Material You widget. Developers can now utilize a cross-platform design framework with dynamic color themes and engaging visual features.
Similarly, there has been significant effort to support custom theme generation with Flutter 3. Just like Android 12, you can craft an app’s entire color scheme from a single starting color. You can also select any color as a baseline for your app’s custom theme.
International Text Input across all desktop platforms
International text input, including for languages that make use of text input method editors (IMEs) such as Chinese, Japanese, and Korean is fully-supported on all three desktop platforms, including third-party input methods such as Sogou and Google Japanese Input.
Dart 2.17
At the IO, Google also announced the latest version of Flutter’s programming language, Dart 2.17.
The most prominent feature of Dart 2.17 is the ability to extend enums and customize its default functions. Developers can add fields holding state, constructors that set that state, methods with functionality, and override existing members.
Previous class inheritance hierarchy in Dart would cause boilerplate code i.e. human repetition and difficulty reading and maintaining the code. This was countered in Dart 2.17 with the introduction of ‘Super Parameters’. Now when inheriting from one class to the other, Flutter Widgets would pass on the ‘Key’ parameter to the Widget class. According to Dart’s Project Manager Michael Thomson, this would save developers nearly 2000 lines of code!
Flutter Web
Flutter web will now automatically detect and use the ImageDecoder API in browsers that support it. Most Chromium-based browsers such as Chrome and Opera support the ImageDecoder API.
This API decodes images asynchronously off the main thread using the browser’s built-in image codecs. This speeds up image decoding by 2x, and it does not block the main thread, removing all junk that was previously caused by images.
The new lifecycle API for Flutter web apps gives you the flexibility to control the bootstrap process of your Flutter app from the hosting HTML page, and helps Lighthouse analyze the performance of your app.
Foldable phone support
The latest release of Flutter is compatible with foldable mobile devices. Flutter paired with Microsoft to introduce a set of new features and widgets that allow you to create dynamic and delightful experiences on foldable devices.
The mediaquery contains a list of display features, whereas displayfeatures subscreen does not overlap the bounds of displayfeatures, which has enabled Flutter to integrate with Foldable phones.
Casual Games Toolkit
Flutter has traditionally been used for app development but with the exponential growth in gaming industry, it has released a ‘Casual Games Toolkit’ which allows casual game developers to use improved graphics features and starter kit of templates to develop casual games.
An engaging and fun IO Pinball game was built using Flutter and Firebase and released at the IO. This shift to casual games is interesting and might indicate Google’s pursuance in the gaming industry in the next few years.
Firebase Support
Firebase is Google’s backend as a service platform that helps you build quality mobile and web applications. It is quite popular among Flutter Developers and a study found around 63% developers employing Firebase for app development. The Firebase plugins for Flutter are being integrated into Firebase’s core package i.e. site and repo.
Additionally, Crashlytics, which is Firebase’s real-time crash reporting service, has been employed to improve support for Flutter apps and allows developers to track fatal errors quickly.
Upgrade from Windows 7/8
Microsoft no longer supports Windows 7 and 8. As such, Flutter has raised the recommended level of app development to Windows 10. This does not mean that development on older Windows versions has been blocked but the testing features are quite limited on it and Flutter would encourage you to upgrade to enjoy extensive features.