Flutter version 2.10 has been released! Although it has been less than two months since the last stable release, even in this short time, Flutter officials have processed and closed 1843 issues and incorporated 1525 PR from 155 contributors around the world.
Flutter 2.10 includes a major update to Flutter support for Windows, several major performance improvements, new support for ICONS and colors in the framework, and some tool improvements. The release also includes updates to remove the Dev channel, reduced support for older versions of iOS, and a few brief disruptive changes. Here’s a look at the Update to Flutter 2.10:
Building Windows desktop application support with Flutter has reached a stable stage
First of all, Flutter 2.10 brings stable Windows support. There is no need to configure support for Windows desktop applications individually with the — enable-Windows-desktop flag because it is now enabled by default!
Of course, there’s more to this stable release than just “deleting” a tag; Windows support for Flutter 2.10 also includes extensive improvements to text processing, keyboard processing and keyboard shortcuts, new ways to integrate directly with Windows, support for command-line arguments, globalized text entry, and accessibility features.
For more information about The Windows Stable release, you can read Flutter for Windows Desktop Stable Release, which details the architecture of Flutter on Windows. It also explains how many Flutter packages and plug-ins are already supported by Windows. You can also check out some of the Tools and examples of Flutter created by Flutter’s application partners on Windows.
Engine performance improvements
This version of Flutter includes initial support for drawing dirty areas management provided by community member Knopp, who enables selective repainting of individual dirty areas on iOS/Metal. This change reduced rasterization times in the 90th and 99th percentiles by an order of magnitude in some benchmarks, and reduced GPU utilization in these benchmarks from above 90% to below 10%.
Flutter hopes to bring the benefits of selective redrawing to other platforms in future versions.
In Flitter version 2.8, Flutter got its own internal image recording format. Now in Flatter 2.10, the Flutter has been optimized with it. For example, a common case of opaque layers can now be implemented more efficiently. Even in the worst case, the frame raster time in the Flutter benchmark fell to less than a third of the previous value.
This optimization will continue to be extended to more scenarios in the future as Flutter continues to develop the recording format.
Dart code is compiled in AOT mode in profile and Release mode. The key to this code’s lightness and efficiency comes from type flow analysis throughout the program, which unlocks a lot of compiler optimization and radical tree-shaking. However, because type flow analysis must cover the entire program, there may be some drain on performance. The new version brings a faster implementation of type flow analysis. In the benchmark for Flutter, the overall build time for Flutter applications decreased by about 10%.
As always, performance enhancements, reduced memory usage, and reduced latency were the priority for the Flutter team. Look forward to further improvements in future releases.
Android Updates
Flutter version 2.10 also contains a number of improvements for the Android platform. Flutter now supports the latest version of Android, Android 12 (API level 31), by default when you create new applications. Additionally, In this release, Flutter enables multidex automatic support. If your app supports Android SDK versions less than 21 and exceeds the dex method limit of 64K, Simply pass the –multidex argument to the flutter Build AppBundle or the flutter Build apk command to add multidex support to your application.
Finally, after Flutter received feedback from developers about Gradle throwing confusing error messages, Flutter adjusted the Flutter command line tool and it now provides solutions to common problems. For example, if you add a plugin to your app that requires you to upgrade the lowest supported Android SDK version, you will now see suggestions for a “Flutter Fix” in the error message.
Flutter will continue to add suggestions for more solutions to common error messages and hopes to get your feedback on other error messages that will significantly help developers deal with similar problems.
Update for iOS
In addition to performance improvements, Flutter also adds and enhances some platform-specific features. Luckysmg brings a new enhancement to Flutter on iOS — smoother keyboard animations that will automatically be applied to your app.
Additionally, Flutter improves the stability of the iOS camera plugin by fixing some edge crashes.
Finally, Flutter adds a new feature that reduces memory usage for 64-bit iOS systems: compression Pointers.
The 64-bit architecture represents Pointers as 4-byte data structures. When you have a large number of objects, the space taken up by the Pointers themselves can increase the overall memory footprint of your application, especially if your application is larger and more complex and has more GC jitter. However, iOS apps are unlikely to have enough objects to take up most of the 32-bit address space (2 billion objects), let alone the massive 64-bit address space (90 billion objects).
Dart 2.15 introduced the ability to compress Pointers. In this release of Flutter, Flutter uses this feature to reduce memory usage for 64-bit iOS applications.
Web Platform Update
This release also includes some improvements to the Web platform. For example, in previous versions, when the mouse was dragged over the edge of a multi-line text box, it did not follow the scroll correctly. In this version, when the selection cursor drags out the text box, the text box scrolls, browses and selects the corresponding text content. This behavior applies to both the Web platform and the desktop.
Flutter 2.10 also includes another significant improvement to the Web platform. Flutter has also been seeking to reduce the overhead of running Flutter applications to the Web platform. In previous versions, Every time Flutter wants to introduce native HTML widgets into a Flutter application, Flutter requires an Overlay as part of Flutter’s support for the Web’s Platform view. Each of these layers supports custom drawing, but also represents a certain amount of performance overhead. If your application has a large number of native HTML widgets (such as links), this can be a significant performance overhead. This version of Flutter, which builds a new “non-drawn platform view” for Web platforms, has largely eliminated this overhead. This optimization has been applied to the Link widget with Flutter, which means that if you have a large number of links in your Flutter Web application, they will no longer incur additional performance costs. Over time, Flutter will apply this optimization to other widgets.
Material 3
This release is the beginning of the transition to Material 3, which includes the ability to generate an entire color scheme from a single seed color.
You can create a new ColorScheme type using any color:
final lightScheme = ColorScheme.fromSeed(seedColor: Colors.green);
final darkScheme = ColorScheme.fromSeed(seedColor: Colors.green, brightness: Brightness.dark);
Copy the code
The ThemeData constructor also has a new colorSchemeSeed argument that generates the theme’s color scheme directly from the color:
finallightTheme = ThemeData(colorSchemeSeed: Colors.orange, ...) ;finaldarkTheme = ThemeData(colorSchemeSeed: Colors.orange, brightness: Brightness.dark, ...) ;Copy the code
In addition, this release includes an argument to themeData.usematerial3, which switches widgets to the new Material3 look and feel.
Finally, Flutter added 1028 new Material ICONS.
You can follow up the Material 3 access situation in this issue, and leave your feedback at any time.
Integration test improvement
In December 2020, Flutter announced a new approach to end-to-end testing using Integration_test. See the Chinese documentation for the Introduction to Integration Testing to learn more. This new package replaces Flutter_driver as the recommended way to do integration testing, providing new features such as Firebase test lab support and Web and desktop support.
Since then, Flutter has made further improvements to integration testing, including incorporating the Integration_test package into the Flutter SDK to make it easier to integrate with your applications. Flutter has now written a new migration guide to help you migrate from Flutter_driver tests to Integration_tests.
The existing documentation, samples, and Codelab have also been updated for Integration_test. If you are not already using integration_test on the Flutter app, start now!
DevTools
In this release, Flutter has also made some improvements to Flutter DevTools, including an easy way to use DevTools directly from the command line. Now you don’t need to use Pub Global Activate to download and run the latest version of DevTools. Simply use Dart DevTools to get the latest version of Flutter that you are using.
Flutter also has a number of usability updates, including improved support for checking large lists and mappings in the debugger variable pane (thanks to Elliott).
Finally, Flutter is about to release its annual DevTools survey! Please provide your feedback and help Flutter improve your development experience.
VSCode improvement
The Visual Studio Code extension to Flutter also gets a number of enhancements, including preview colors in more places in the Code and a color picker that updates the color Code.
In addition, if you want to be a tester for pre-release versions of VSCode’s Dart and Flutter extensions, you can switch to pre-release versions in your extension Settings.
You can read more about this update in this article on the flutter- Announce mailing list.
Remove the Dev release channel
In Flutter 2.8, Flutter has announced that Flutter is working to remove dev release channels to simplify your choices and reduce development costs. In this version, Flutter has done this work, including:
- Update the Flutter tool to help migrate developers out of the development channel
- Update the wiki’s description and commitment to each channel
- Update deprecation policy
- Remove dev channel support from DartPad, pre-commit tests, and websites
The Dev channel has now been completely removed. Tell the Flutter if the Flutter misses some positions that have not been removed.
IOS 9.3.6 support is coming to an end
Due to the reduced use and increased maintenance of target devices in Flutter LABS, Flutter is adjusting its support for iOS 9.3.6 from “support” to “best efforts”. This means that support for iOS 9.3.6 and support for 32-bit iOS devices will be maintained only through coding practices, ad-hoc, and community testing.
Flutter is expected to drop support for 32-bit iOS devices and iOS versions 9 and 10 in the stable release of Flutter in Q3 2022. This means that apps built on the stable Flutter SDK will no longer run on 32-bit iOS devices, and that the minimum iOS version of Flutter support will be increased to iOS 11.
Destructive modification
Flutter also works hard to reduce destructive changes in each release and this one. Although Flutter has not gone to zero yet, Flutter will continue to work hard!
- Build the Kotlin version of the Flutter application later than 1.5.31
- Deprecated API removed after Flutter 2.5
- Raw images on the Web use the correct source and color
- Apple Pencil conveniently write TextInputClient changes
If you are still using these apis, read the migration guide on flutter. Dev. As always, we are grateful to the community for contributing tests to help Flutter identify these destructive changes.
The last
Flutter excellent course recommendations
- Flutter advanced practical imitation of Bilibili APP
- Flutter from entry to advanced practice