Flutter is Google's UI framework for crafting high-quality native interfaces on iOS, Android, web, and desktop. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source. Learn more athttps://flutter.dev
Welcome to Flutter 3.10! We can’t wait to show off the huge efforts of our amazing Flutter community. This Flutter release runs the incredibleDart 3 also availabletoday!
Flutter 3.10 includes many improvements to web, mobile, graphics, security and so much more. Let’s get down to business!
The Material library now matches the latestMaterial Design spec. Changes include new components and component themes, updated component visuals and more. Developers must “opt in” to these changes using theuseMaterial3
theme flag.In the next stable release,useMaterial3
defaults totrue
.
To opt in to the M3 version of the Material library, setuseMaterial3 : true
in yourMaterialApp
theme. Theflutter create
command adds this to your theme when creating a new app.
To preview these changes, check out thedemo app. The demo lets you toggleuseMaterial3
on and off.
All M3 components configure the default colors of the theme’sColorScheme
. The default color scheme uses shades of purple. You can create a custom color scheme either from a single “seed” color or from an image. Try both variations with the demo. Color schemes generated should look good and be accessible.
This provides an M3 version ofBottomNavigationBar
widget. WhileM3 uses different colors, highlighting, and elevation, it works as it did before. To override the default appearance of theNavigationBars
widget, use theNavigationBarTheme
widget. Though you don’t need to migrate existing apps to this component, you should use it for new apps.
This provides anM3 destination selection widget based on the Drawer widget.NavigationDrawer
shows a single-selection list ofNavigationDestinations
widgets. You can include other widgets in this list as well. TheNavigationDrawer
can scroll when needed. To override the default appearance of theNavigationDrawers
widget, use theNavigationDrawerTheme
widget.
These components provide predictive text for search queries. When the user enters a search query, the app computes a list of matching responses in a “search view”. The user either selects one or adjusts the query. To override theM3 design of these components, use theSearchBarTheme
andSearchAnchorTheme
widgets.
M3 allows you to create a second tier of tabbed content. To distinguish this secondTabBar
, useTabBar.secondary
.
The M3DatePicker
updates the colors, layout, and shape for both the calendar and textfield versions of the widget. This doesn’t change the API, but adds a newDatePickerTheme
.
The M3TimePicker
, like theDatePicker
, updates the colors, layout, and shapes for both the regular and compact versions of the widget.
Beyond M3 color and shape updates, the bottom sheet now adds an optional drag handle that’s included when you setshowDragHandle
totrue
.
The M3ListTile
updates positioning and spacing of this widget. This includes content padding, leading and trailing widget alignment, minimum leading width, and vertical spacing. The API remains unchanged.
The M3Drawer
updates the colors and elevation while making some small layout changes.
M3 updates allTextField
widgets to support native gestures. Double clicking or triple clicking with a mouse work the same as double tapping or triple tapping on a touch device. By default, theTextField
andCupertinoTextField
widgets use these features.
TextField
double click/tap gesturesTextField
triple click/tap gesturesTextField
(Android/Fuchsia/iOS/macOS/Windows).TextField
(Linux).TextField
.TextField
.TextField
.Flutter Framework now compiles with Supply Chain Levels for Software Artifacts (SLSA) Level 1. This acknowledges the implementation of many security features including:
This work also allows the team to advance toward SLSA L2 and L3 compliance. These two levels focus on protecting artifacts during and after the build process.
This release reduces the file size of icon fonts. It pruned unused glyphs from both Material and Cupertino.
Chromium-based browsers can use an even smaller custom CanvasKit “flavor”. The hosted CanvasKit serves from Google’s industry-leading CDN. This should improve performance further.
You can nowserve Flutter web apps from a specific element in a page. Before this release, your apps could either fill the entire page body or display within aniframe
tag.Sample code can be found in GitHub.
Web apps can use Flutter’sfragment shader support.
In the 3.7 stable release, we previewedImpeller on iOS. Since then, we received and addressed a lot of great feedback from users. With over 250 commits to Impeller in this release, we set Impeller as our default renderer on iOS. By default, all apps built for iOS with Flutter 3.10 use Impeller. These iOS apps will have less jank and better consistent performance.
Since the 3.7 release, Impeller on iOS has improved its memory footprint. Impeller uses fewer render passes and intermediate render targets. On newer iPhones, enabling lossy texture compression reduced memory footprint without affecting fidelity. These advances also made a marked improvement in performance on iPads.
Consider a complex screen like the “pull quote” screen in theWonderous app. Together, these improvements cut the memory footprint of those screens almost in half. The reduction in memory usage also gives a modest drop in GPU and CPU load. The Wondrous app may not register that drop in load. Its frames had rendered under budget before, but this change should extend battery life.
Impeller also unlocks the team’s ability to deliver popular feature requests faster. One example results in support for the wider P3 color gamut on iOS. Look elsewhere in this post for a description of that feature.
Community contributions accelerated our progress, in particular GitHub usersColdPaleLight andluckysmg. They authored several Impeller-related patches that improved fidelity and performance.
While Impeller meets the rendering needs of most Flutter apps, you can opt-out of Impeller. If you choose to opt-out, considerfiling an issue on GitHub to tell us why. App users may notice that Skia and Impeller render with minor differences. These differences could be bugs, so don’t hesitate to file issues. In a future release, we will remove the legacy Skia renderer for iOS to reduce Flutter’s size.
Progress continues on a Vulkan backend for Impeller. Impeller on Android remains under active development but not ready for preview. We plan to share more about it in the near future.
To follow along with our progress, check outour GitHub project board.
This release covers more performance improvements and fixes aside from Impeller.
We want to thank open-source contributorluckysmg. They discovered they could slash the time to get the next drawable layer from the Metal driver. To get that bonus, you need to set theFlutterViews
background color to a non-nil value. This change eliminates low frame rates on recent iOS 120Hz displays. In some cases, ittriples the frame rate. This helped us close over half a dozen GitHub issues. This change held such significance that we backported a hotfix into the 3.7 release.
In the 3.7 stable release, we shifted loading of local images from the platform thread to the Dart thread to avoid delaying vsync events from the platform thread. However,usersnoticed that this additional work on the Dart thread also caused some jank. In this release, we moved the opening and decoding of local images from the Dart thread to abackground thread. This change eliminates potential long pauses on screens with a lot of local images, while avoiding delaying vsync events. In our local testing and automated benchmarks, this change cut the load time for several simultaneous images in half.
We continue to build optimizations on top of Flutter’s new internal DisplayList structure. In this release, we added anR-Tree based culling mechanism. This mechanism removes the processing of drawing operations much earlier in our renderer. This optimization accelerates,for example, a custom painter whose output fails offscreen. Ourmicrobenchmarks showed a decreased DisplayList processing time of up to 50%. Apps with clipped custom paints could see differing improvements. The degree of improvement depends on the complexity and number of hidden draw operations.
Aninefficient strategy for identifier lookups in app bundles increased app startup latency. This startup latency grows in proportion to the app’s size. In this release,we fixed the bundle identifier lookup. This reduced startup latency by 100ms or about 30–50% in a large production application.
Flutter usesSkParagraph
as the default library for text shaping, layout, and rendering. We included a flag to fall back on the legacylibtxt
andminikin
libraries. As we have full confidence inSkParagraph
,we removedlibtxt
andminikin
and their flag in this release. This reduces Flutter’s compressed size by 30KB.
In the 3.0 release, we enabled an Android feature late in our rendering pipeline. This Android feature used advanced GPU driver features. These driver features repaint less of the screen when only one “dirty” region changes. We added this to earlier optimizations to our graphics pipeline with similar effects. Though our benchmarks results encouraged us, two issues surfaced. First, the most improved benchmark might not represent practical use cases. Second, the set of devices and Android versions that supported this GPU driver feature provedhard to find. Given the limited advances and support, wedisabled the partial repaint feature on Android.
The feature remains enabled on iOS when using the Skia backend. We expect toenable it with Impeller in a future release.
Flutter 3.10 addresses one of our mostpromoted issues. Itadds the ability to decodeAPNG
images. You can loadAPNG
images with Flutter’s existing image loading APIs.
Flutter’s esteemed Director of Engineeringtvolkert has landed improvements todart:ui
’s image loading APIs. We have added anew methodinstantiateImageCodecWithSize
. This supports theuse case of loading an image that meets these three conditions:
An example would be when an app tries to display one image from a pool of possibilities loaded from the network.
You can now run and hot reload your Flutter iOS apps without a cable! After a successful wireless pairing of your iOS device in Xcode, you can deploy your app to that device using flutter run. If you encounter issues, verify the network icon appears next to your device underWindow > Devices andSimulators > Devices. To learn more, check out ourdocumentation.
Flutter apps on iOS can now support accurate rendering for wide gamut images. To use wide gamut support, the app must use Impeller and add theFLTEnableWideGamut
flag in theInfo.plist
file.
TheSpellCheckConfiguration()
widget now defaults to supportingApple’s spell check service on iOS. To use this widget, set it using thespellCheckConfiguration
parameter inCupertinoTextField
.
This release adds theCupertinoCheckBox
andCupertinoRadio
widgets to theCupertino
library. They create checkbox and radio button components that match Apple’s styling.
The Material checkbox and radio widgets added the.adaptive
constructors. On iOS and macOS, these constructors use the corresponding Cupertino widgets. On other platforms, they use Material widgets.
Flutter 3.10 improved some animations, transitions, and colors to match SwiftUI. These improvements include:
CupertinoPageRoute
transitionCupertinoSliverNavigationBar
CupertinoColors
WhenPlatformViews
appear on screen, Flutterthrottles the refresh rate on iOS to reduce jank. App users will notice this when the app displays animated or scrollablePlatformViews
.
Flutter now supports thesharedDarwinSource
key in thepubspec.yaml
file for plugins. This key indicates that Flutter should share iOS and macOS code.
ios:
pluginClass: PathProviderPlugin
dartPluginClass: PathProviderFoundation
sharedDarwinSource: true
macos:
pluginClass: PathProviderPlugin
dartPluginClass: PathProviderFoundation
sharedDarwinSource: true
We addeddocumentation for Flutter developers to use iOS app extensions. These extensions include live activities, home screen widgets, and share extensions.
To simplify creating home screen widgets and sharing data, we added new methods to thepath_provider
andhomescreen_widget
plugins.
The documentation now includes cross platform design considerations for specificUI components. To learn more about each of these UI components, check out thediscussions in the Flutter UX GitHub repository. We appreciate any input or feedback!
Camera X, a Jetpack library, simplifies adding rich camera functionality to your Android app. This functionality applies across a wide selection of Android Camera hardware. With this release, we add preliminary support for CameraX to the Flutter Camera plugin. This support covers the following use cases:
To give it a try, opt in to using the CameraX implementation. To opt in, add the following line to yourpubspec.yaml
file.
Dependencies:
camera: ^0.10.4 # Latest camera version
camera_android_camerax: ^0.5.0
We would love your feedback as we continue to add more CameraX features then make CameraX the default implementation.
We continue to improve DevTools, the suite of performance and debugging tools for Dart and Flutter. Some highlights include:
To learn more, check out the release notes forDevTools 2.23.1,DevTools 2.22.2, andDevTools 2.21.1.
Breaking changes in this release include deprecated APIs that expired after the release of v3.7. To see all affected APIs, along with additional context and migration guidance, check outthe deprecation guide for this release.Dart Fix can remedy many of these issues, including quick fixes in the IDE and bulk apply with thedart fix
command.
After you upgrade Android Studio to Flamingo, you might see an error when you try to flutter run or flutter build your Flutter Android apps. This error occurs because Android Studio Flamingo updates its bundled Java SDK from 11 to 17. Gradle versionsearlier than 7.3 can’t run when using Java 17. Weupdatedflutter analyze --suggestions
to validate if this error occurs due to incompatibility between your Java SDK and your Gradle version.
To learn different ways to fix this error, check outour migration guide.
This release deprecates the window singleton. Apps and libraries relying on it shouldmigrate away from it. This prepares your app for multi-window support when it launches in a future version of Flutter.
As always, many thanks to the community forcontributing tests, they help us identify these breaking changes. To learn more, check outour breaking change policy.
As we wrap up this release, the Flutter team at Google wants to thank all the contributors who have made this release possible. Your dedication and hard work have helped to make Flutter a game-changer in the industry and continue to revolutionize application development. We encourage you to start exploring this latest stable version of Flutter to take advantage of all the amazing features it has to offer. To do so, justflutter upgrade
! Stay tuned for more exciting updates from Flutter in the future.
Flutter is Google's UI framework for crafting high-quality native interfaces on iOS, Android, web, and desktop. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source. Learn more athttps://flutter.dev
Kevin Chisholm is a Technical Program Manager for Dart and Flutter at Google.