In all the development contests, newer and advanced frameworks are being launched to enhance the development process and help developers create effective mobile, desktop, and web apps. Flutter came up with the release of its new version called Flutter 2.10. It has several new features and improvements (especially for Windows app developers) which refine the development process to be more reliable and effective in every possible way.
Flutter always strives to serve the developers what they need. It gathers the mobile, web, desktop, and embedded developers into a single toolkit: letting developers focus firstly on what they want to build rather than targeting a specific platform. It is a high-performance, more productive framework that shortens the inner loop for developers and enables one codebase to target multiple platforms and form factors.
On 03 February 2022, Flutter released its latest version 2.10. Although it is not a major update, it came with a few interesting additions. This update mainly benefitted Windows app developers, but iOS and Android developers can also leverage this update.
What’s Special in Flutter 2.10?
Flutter and Windows
Flutter laid the ambition years ago to extend from mobile apps on iOS and Android to other platforms like desktop and web apps.
Just as with Flutter’s support for Android and iOS, the Windows implementation of Flutter combines a Dart framework and C++ engine. Windows and Flutter connect through an embedding layer that hosts the Flutter engine and is responsible for translating and dispatching Windows messages.
Flutter coordinates with Windows to paint your UI to the screen and handles events like window resizing and DPI changes. Additionally, it works with existing Windows methods for internationalization, such as input method editors.
With the release of Flutter 2.10, the toolkit’s support for making apps for Windows is now considered “stable”. It means it’s fully ready for developers to use for developing apps used by the masses. In preparation for Flutter for Windows, Google has been working with third-party developers to ready a full ecosystem of plugins for the Windows apps. This release includes large improvements for text handling, keyboard handling, and keyboard shortcuts, as well as new integrations directly into Windows.
This update has enhanced performance as this release of Flutter includes initial support for dirty region management. One of the Flutter community suggested this. It enabled partial repaints for a single dirty region on iOS/Metal. This change has reduced 90th and 99th percentile rasterization times on a few benchmarks by an order of magnitude, and reduced GPU utilization on these benchmarks from more than 90% to less than 10%.
Previously in Flutter 2.8, there was flutter’s own internal picture recording format. Now in the 2.10 release, Flutter has started building optimizations with it. For example, one common case of opacity layers is now implemented much more efficiently. Even in the worst case, frame raster times in benchmarks fell to under a third of their previous value.
Moreover, flutter will likely expand this optimization to cover more cases as it continues to develop the picture recording format. This release also includes faster implementations of type flow analysis. Interestingly, overall build time for a flutter app has been reduced to 10% according to their benchmark.
Updates for iOS
Flutter has also added some enhancements and features for iOS. One of the enhancements is the smooth keyboard transitions in iOS. It is provided by one of Flutter’s contributors and is automatically provided to your app without doing any specific action.
In this release, the stability of the camera plugin for iOS has been improved by fixing a few edge case crashes.
Finally, a new feature for iOS “compressed pointers” has also been introduced. It helps reduce memory usage in 64-bit iOS architectures as it occupies a lot of space when opting for 64-bit architecture. In case, you have a lot of objects, it will contain a lot of space, however, your iOS app is very unlikely to have enough objects to require a significant portion of even the 32-bit address space (2 billion objects), let alone the enormity of the 64-bit address space (9 million billion objects).
Updates for Android
In addition to improving performance and introducing windows support, this release contains several improvements for Android as well. When you create a new app, Flutter itself defaults to support the latest version of Android, version 12 (API level 31). In this release, Flutter defaults enabled multidex support automatically. If your app supports Android SDK versions below 21, override back button flutter and it exceeds the method limit of 64K, simply pass the –multidex flag to flutter build app bundle or flutter build apk and your app will support multidex.
And last but not least, Flutter listened to developers’ feedback that Gradle error messages can be intimidating. Owing to this, the Flutter tool now suggests resolution steps to common issues. For instance, if you add a plugin to your app that requires you to increase the least supported Android SDK version, you now see a “Flutter Fix” suggestion in the logs.
This release has some improvements for the web as well. For example, in previous releases, when we scroll to the edge of a multiline TextField on the web, it wouldn’t scroll properly. This release introduced “edge scrolling for text selection”. When the pointer selecting the text moves outside of the text field, the field scrolls to view the scroll limit. This new feature is also available for both desktop apps.
Moreover, flutter has also reduced the overhead of mapping Flutter to the web.
In this release, Flutter created a new “non-painting platform view” for the web that removes that overhead particularly. And Flutter has taken advantage of this optimization in the Link widget, which means if you have many links in your Flutter web app, they no longer represent any significant overhead at all. Flutter also intends to apply this optimization to other widgets over time.
Material 3 in Flutter 2.10
This release is a new step for transition to material 3, which allows you to generate the entire color scheme from a single seed color.
There’s also a new parameter that is the colorSchemeSeed to the ThemeData factory constructor. It offers you to generate the theme’s color scheme.
In addition, this release includes the ThemeData.useMaterial3 flag, which switches components to the new Material 3 look. Last but not least, Flutter added 1,028 new Material icons.
Improved Integration Testing
In 2020, Flutter introduced a new way to perform end-to-end testing using the integration_test package.
This new package replaced the flutter_driver package as the preferred way to do integration testing. As it provides new features, like Firebase Test Lab support as well as support for web and desktop.
Since then, Flutter has made further improvements to the integration testing story, including bundling the integration_test package into the Flutter SDK itself. Which makes it easier to integrate with the app.
Flutter has also done some work on DevTools in this release as well. This includes one ease-of-use feature if you use DevTools from the command line. Instead of using pub global activate to download and execute the latest version, you can simply use dart devtools. From there, you can get the version that is up-to-date with the version of Flutter that you’re using.
Additionally, Flutter has also made improvements to its usability. This includes improved support for inspecting large lists and maps in the debugger variable pane too.
Improvements in VSCode
In this release, Flutter has also improved the VSCode extension. It includes color previews in more places in your code and a color picker that updates your code for you.
You can head over to the VSCode extension in your setting and switch to the prerelease version of the Dart and Flutter extension if you would like to be a tester on it.
Ending Support for iOS 9.3.6
In this release, Flutter has now limited its support for iOS 9.3.6 and 32-bit iOS devices. Flutter has moved its support for these devices from the “Supported” tier to the “Best Efforts” tier. This means that support for these devices will only be maintained only through coding practices, ad-hoc, and community testing.
In the Q3, 2022 stable release, Flutter hints to drop support for 32-bit iOS devices and iOS versions 9 and 10 from its stable releases. This means that apps built against stable Flutter SDKs after that point will no longer be working on 32-bit iOS devices, and the minimum iOS version supported by Flutter will increase to iOS 11.
Flutter took this step just because of the decreased usage and increased difficulty in maintaining the target devices.
No Dev Channel in 2.10
In Flutter 2.8 release, Flutter announced that they would work to remove the dev channel. This would simplify your choices, and remove engineering overhead –Flutter announced. In this release, Flutter completed that work.
- Updated Flutter tool to help shift developers off the dev channel
- Updated wiki to reflect updated customer promises
- Deprecation Policy Updated
- Removed dev channel support from DartPad, pre-submit tests, and the website
In Flutter 2.10 you’re not going to see Dev Channel now.
After going through this precise introduction of what’s new in Flutter 2.10 you might have realized what this update has for us. Flutter continues to bring exciting updates more often. Let’s hope to have more productive and useful features in Flutter in the future.