Flutter 3.3 officially released
Flutter 3 is a major milestone in our official support for the entire platform. It has only been three months since its release. Today we have the official version of Flutter 3.3! We haven't slowed down our update iterations for nearly three months - we've merged 5687 pull requests for Flutter since Flutter 3 was released.
This update brings performance and other updates to the Flutter web platform, desktop platform, text processing, and more.
We will also introduce updates related to the go_router package, DevTools (developer tools) and VS Code extensions. Read on with us to learn more about them!
So far, Flutter's text selection interaction on the web has not lived up to expectations. Unlike Flutter apps, native web apps build each node as a tree structure. In traditional web applications you can easily use drag gestures to select nodes on the web page, which is not easy to achieve in Flutter web applications.
From today, everything has changed. we introduced
SelectionArea widget, its child widgets are now freely selectable!
SelectionAreaWrap the content displayed by the route (for example
Scaffold), Flutter takes care of everything for you, and you can enjoy this powerful new feature.
For a fuller in-depth look at this awesome new feature, visit the SelectionArea API page .
Flutter 3.3 optimizes support for touchpads. Flutter not only provides richer and smoother control, but also reduces false touches in several specific situations. If you want to see examples of false touches, you can check out the Flutter Practical Tutorials page. Scroll the page to DartPad at the bottom and follow the steps below:
- Shrink the window so that scrollbars appear in the upper half
- Hover the pointer over the top half
- Scroll with the trackpad
- Before Flutter 3.3, scrolling with a trackpad would drag elements because Flutter dispatched simulated gesture events
- Starting with Flutter 3.3, scrolling with the trackpad will correctly scroll the list, because Flutter will pass "scroll" events, the cards will not recognize these events, and the list will be processed accordingly
For more information, visit the design documentation for Flutter Trackpad Gestures ) and check out the following pull requests:
- PR 89944: Support trackpad gestures in frames
- PR 31591: Touchpad gestures on iPad
- PR 34060: ChromeOS/Android trackpad gestures
- PR 31594: Trackpad gestures for Win32
- PR 31592: Trackpad gestures for Linux
- PR 31593: Trackpad gestures on Mac
Thanks for input from community member fbcouch . This feature is already available by default in
EditableText enabled on. Just upgrade Flutter to 3.3 to bring this new feature to your users.
In order to optimize support for rich text editing, in this update we have added support from the underlying platform
TextInputPluginThe ability to receive more granular updates. before
TextInputClientOnly the new edit state can be passed, and the amount of change between the old and new states cannot be subdivided,
DeltaTextInputClientFill this section with poor information. By accessing these deltas, you can build custom styles for the input area, which expands and contracts as you type. For more information, you can check out the rich text editor example .
Material Design 3 support
The Flutter team continues to integrate more Material Design 3 components into Flutter. This update includes medium and expanded styles for IconButton .
To track the progress of the Material Design 3 integration, you can check out Bringing .
Medium and Large AppBar Examples
When building Windows desktop apps earlier, the version of the app could only be set in the file. Such behavior is not consistent with the behavior of setting versions on other platforms.
Versions of the Windows desktop app are now available via
pubspec.yaml and build parameters to set. It helps to provide app update functionality to your users in your app when your app pushes an update.
To learn more about setting Windows desktop app version numbers, check out the documentation . Projects created before Flutter 3.3 will need to be manually adjusted to use this feature.
When your app contains complex navigation needs, it can be confusing. In order to extend Flutter's navigation API, the team released a new version of the go_router package , which makes your routing logic design on all platforms more concise.
The go_router package, maintained by the Flutter team, makes it easier to navigate and deal with deep links through a declarative and URL-based API. The latest version, 5.0, allows applications to redirect via asynchronous code, and includes some breaking changes .
For more information, see the official documentation: Routing and Navigation .
VS Code plugin enhancements
The Flutter extension for VS Code also brings updates that add dependencies. you can use
Dart: Add Dependency Commands plus commas add multiple dependencies at once.
You can check out the following for updates to all the Flutter plugins for VS Code since the last stable version of Flutter was released:
Flutter Developer Tools Update
DevTools has also included several updates since the last stable release of Flutter, including UX and performance improvements for data table presentations, and reduced stuttering when scrolling long lists of events ( #4175 .
Here are the announcements for each version of DevTools since Flutter 3.0:
- Flutter DevTools 2.16.0 Release Notes
- Flutter DevTools 2.15.0 Release Notes
- Flutter DevTools 2.14.0 Release Notes
Raster cache improvements
This update improves the performance of loading resource images and reduces the pressure of copying image data and Dart garbage collection (GC). When loading a resource image previously,
ImageProvider Requires multiple copies of compressed data. First, when the image is opened, the data is copied to native heap memory and an array of structures is exposed to Dart. Then, the data is converted in the struct array to the built-in storage
ui.ImmutableBuffer is copied again.
With the introduction of the new ui.ImmutableBuffer.fromAsset . This loading process is also faster because it bypasses the overhead of the additional scheduling required by the previous method channel. In our benchmarks in particular, images loaded about 2x faster.
For more information, please check the official documentation: Add ImageProvider.loadBuffer .
Disable iOS memory pointer compression
In the Flutter 2.10 stable release, we enabled Dart's memory pointer compression optimizations for iOS. However, Yeatse reminded us on GitHub that this optimization has consequences we didn't expect . Dart implements pointer compression by maintaining a large virtual memory for the heap. Since the total virtual memory allowed on iOS is less than other platforms, other components such as Flutter plugins can hold less virtual memory.
Although disabling pointer compression will increase the memory consumed by Dart objects, it also restores the non-Dart portion of memory available to Flutter applications, which is generally a more appropriate solution.
Apps can increase the maximum virtual memory allocation, but this is only available on newer iOS versions, and not on other versions of iOS devices supported by Flutter. We will re-evaluate when we are able to use this optimization in all locations.
In previous versions, you needed to manually configure a custom Zone to catch all exceptions and errors for your application. However, custom Zones don't apply to some optimizations in Dart's core library, which can slow down your app's startup time. In this update, you can catch all errors and exceptions by setting the PlatformDispatcher.onError callback instead of a custom Zone. For more information, check out the updated official documentation: Handling Errors in Flutter .
written in GLSL and in
shader:Partially declared fragment shaders are now automatically compiled into a format that the engine can correctly recognize and automatically bound as resources for the application. With this change, developers no longer need to use third-party tools to compile shaders. In the future, the engine's FragmentProgram API may only accept tool builds from Flutter. We haven't applied this change yet, but it may be implemented in the future as planned in the design document for FragmentProgram API Improvement Support .
To learn more, you can check out this Flutter shader example .
Layout decimal handling
In previous versions, the Flutter engine would precisely align compositing layers to pixels, which was used to improve Flutter's rendering performance on older iPhones (32-bit). And after we added support for desktop platforms, we noticed that this action resulted in visible jitter, because desktop platforms have lower device pixels than usual. On lower DPR devices, for example, cues can cause noticeable jitter when fading in. After determining that newer iPhone devices do not need this optimization, we have removed the Flutter engine to improve rendering fidelity on the desktop.
In addition, we found that removing these pixel alignments made minor rendering differences that were previously seen during the golden image test more stable.
Stop supporting 32-bit iOS
As we mentioned when we released Flutter 3.0, version 3.0 was the last version to support 32-bit iOS devices as well as iOS 9 and 10 due to reduced usage. This change will affect iPhone 4S, iPhone 5, iPhone 5C, and 2nd, 3rd, and 4th generation iPad devices. Flutter 3.3 stable and later will no longer support 32-bit iOS devices and iOS 9 & 10. This means that apps built with Flutter 3.3 and later will no longer run on these devices.
macOS 10.11 and 10.12 support is coming to an end
We will drop support for macOS versions 10.11 and 10.12 in the upcoming Q4 2022 official release schedule. This means that the stable version of the Flutter SDK after this will not work on these versions, and the minimum supported macOS version of Flutter will be raised to 10.13 High Sierra.
Stop supporting Bitcode
The upcoming release of Xcode 14 will no longer support submitting iOS apps with Bitcode , and this version of Xcode will warn about projects that have bitcode enabled. Therefore Flutter will remove support for bitcode in future stable releases. We don't want to affect a lot of developers, so by default, Flutter will not turn on bitcode. However, if you manually turned on bitcode in your Xcode project, please turn it off as soon as possible after upgrading to Xcode 14.
you can open
ios/Runner.xcworkspaceAnd set Enable Bitcode to No in build settings to turn it off. Hybrid development applications can turn it off in the Xcode project of the host project.
You can check out Apple 's documentation to learn more about bitcode distribution.
The Google Flutter team really appreciates every member of the community for all the hard work that goes into making the Flutter experience even better, we look forward to building on what's been done, and we always value our most important and valuable asset - Every member of the community!
Original link :
Localization : CFUG Team: @AlexV525, @chenglu, @Vadaski, @Nayuta403
Chinese link : https://flutter.cn/posts/whats-new-in-flutter-3-3
Related: Flutter 3.3 officially released
- Framework update
- Material Design 3 support
- Desktop platform
- Packages update
- VS Code plugin enhancements
- Flutter Developer Tools Update
- performance improvements
- frame stability
- API improvements