Flutter 3.22 Release Highlights
Published on by Flutter News Hub
We're thrilled to announce the release of Flutter 3.22, packed with major upgrades and new features aimed at enhancing performance, improving developer workflows, and expanding platform capabilities. Here’s a detailed overview of what’s new:
WebAssembly (Wasm) on Stable Channel
WebAssembly (Wasm) is now available in the stable channel, offering significant performance improvements for Flutter web apps. Internal benchmarks on an M1 MacBook show that Wasm improves the Wonderous app’s frame rendering time by 2x on average and 3x in worst-case scenarios, resulting in smoother animations and transitions. Get started with our Dart Wasm documentation and Flutter Wasm documentation.
Impeller Rendering Engine Enhancements
Vulkan Backend
The Vulkan backend for Impeller on Android is now feature complete, providing smoother graphics and better performance. Apps opting into Impeller will use Vulkan where available, falling back to OpenGL ES on devices that don’t support Vulkan.
Blur Performance
Blur effects in Impeller have been reimplemented, significantly reducing CPU and GPU time by nearly half in benchmarks, enhancing both iOS and Android performance.
Stencil-then-Cover Technique
Impeller has adopted the Stencil-then-Cover rendering strategy to efficiently handle complex path rendering, improving performance for Lottie animations and other intricate graphics.
Framework Improvements
Widget State Properties
MaterialState has been renamed to WidgetState and moved outside the Material library to be available across the Flutter framework and package authors. This change promotes more flexible state management.
Dynamic View Sizing
Enhancements in dynamic view sizing improve responsive layouts, ensuring better adaptability across various device screens.
Improved Form Validation
New form validation methods, contributed by SharbelOkzan, allow for more robust user input handling, enhancing usability and security.
Flavor-Conditional Asset Bundling
Developers can now bundle assets conditionally based on build flavors, optimizing asset management for different environments.
Android Updates
Deep Linking Validation
Enhanced deep link validation within DevTools now checks Android manifest files, improving the setup process for deep links.
Predictive Back Gesture
Support for Android’s upcoming predictive back gesture has been added, allowing users to peek at previous routes or apps during a back gesture.
Gradle Kotlin DSL
Flutter now supports Gradle Kotlin DSL, providing a better code editing experience with features like auto-completion and context-aware refactoring.
End of KitKat Support
Flutter’s minimum supported Android version is now Lollipop (API 21). Support for KitKat (API 19) has been dropped.
iOS Updates
Platform View Performance
Significant improvements in platform view performance reduce GPU usage by 50% and improve frame rendering times, providing a smoother experience especially in scrolling views with multiple platform views.
Ecosystem Enhancements
Vertex AI for Firebase Dart SDK
The Vertex AI for Firebase Dart SDK is now in public preview, enabling the use of the Gemini API for AI-driven features in Dart or Flutter apps. It integrates with Firebase App Check for secure backend infrastructure.
DevTools Updates
DevTools has been enhanced with performance improvements, advanced filtering, CPU samples in the timeline, and support for importing and exporting memory snapshots.
Google Mobile Ads SDK
Version 5.0.1 of the Google Mobile Ads SDK for Flutter adds support for the latest APIs, expanded mediation partners, and improved privacy compliance features.
Breaking Changes and Deprecations
ColorScheme.fromSeed
For vibrant and accurate color schemes, consider using DynamicSchemeVariant.fidelity or DynamicSchemeVariant.content when using ColorScheme.fromSeed with high chroma values.
Removal of v1 Android Embedding
Version one of the Android embedding has been fully removed. Developers should update their plugins and apps to use version two.
Conclusion
This release underscores our commitment to providing a robust and performant Flutter framework, enabling you to build beautiful and efficient apps across multiple platforms. Dive into the full release notes and changelog, and upgrade to Flutter 3.22 to start exploring these exciting new features and improvements!