Flutter 3.19 – What’s new in Flutter

Gemini API, Impeller and Windows Arm64 updates.

Welcome to the latest version of Flutter, version 3.19! This update marks another significant step forward in Flutter’s evolution, offering developers a host of exciting features and improvements to improve their app development experience.

Flutter 3.19 review: Flutter 3.19 is a testament to the continuous development of the Flutter platform. Focused on empowering developers and improving the user experience, this release introduces a host of features and enhancements to meet the diverse needs of app creators.

Key updates version 3.19:

  1. Gemini API. The Gemini API offers developers a powerful tool for granular control over widget animations. This not only opens up new possibilities for creativity, but also improves the user experience in Flutter apps.

  2. Impeller Updates: The Impeller rendering engine has received a significant improvement, promising improved performance and smoother development. This update highlights Flutter’s commitment to optimizing the core components that make apps responsive and visually appealing.

  3. Windows Arm64 support. Striving for inclusivity, Flutter 3.19 expands support for Windows Arm64 devices. This move expands the capabilities of Flutter apps, allowing them to integrate seamlessly with a wider range of platforms and devices.

Flutter 3.19 introduces many new features designed to empower developers and improve the performance of their applications. One of the standout features of this release is the introduction of the Dart SDK for Gemini, a revolutionary enhancement that opens up new possibilities for application development. With Gemini, developers have access to a powerful set of tools and libraries that enable them to create more complex and responsive applications than ever before.

Artificial Intelligence Integration with Gemini API

With Flutter 3.19, the integration of Google AI with the Gemini API marks a major milestone in the evolution of app development. With the beta release of the Google AI Dart SDK, developers now have the opportunity to infuse their Dart and Flutter apps with generative AI capabilities, leveraging the cutting-edge capabilities of Google’s latest AI models.

We are pleased to announce the release of the Google AI Dart SDK for the Gemini API. New pub.dev package google_generative_aiAnd support resources allow you to build AI-powered generative functionality into Dart and Flutter apps through Dart’s idiomatic integration with the Gemini API. It opens the door to a wide range of possibilities for building smart and productive apps for Android, iOS, web, macOS, Windows and Linux from a single code base.

With the Google AI Dart SDK you can:

  • Easily integrate generative AI features: Add advanced text generation, summarization, chat, and more to your Dart or Flutter apps with minimal customization.

  • Take advantage of Google’s most powerful and general model: The Gemini model builds on Google’s extensive research and development in machine learning, giving you access to the generative capabilities of artificial intelligence that will continue to improve.

  • Accelerate your AI application development. Focus on your application logic and user experience, and the SDK will take care of the intricacies of interacting with artificial intelligence models.

  • Create cross-platform applications powered by artificial intelligence. Easily build generative AI features for desktop, web, and mobile applications using Flutter.

  • Use the Gemini API in over 180+ countries and territories. Check available regions for the most up-to-date list of countries and regions where the Gemini API and Google AI Studio (described below) are available.

What can you create? Check out Quick Start Guide to Dart for a detailed step-by-step setup guide.

The possibilities are endless with the Google AI Dart SDK and Gemini API. Dive into the world of AI-powered app development and discover new opportunities to create intelligent and engaging experiences for users around the world.

Platform improvements

Flutter 3.19 introduces a number of improvements to the platform, expanding development capabilities and improving the functionality of various widgets. Let’s dive into the details:

Scrolling improvements:

  • Flutter’s scrolling behavior has undergone significant improvements. Previously, scrolling with two fingers twice as fast was solved by adjusting the default value ScrollBehaviorby using MultiTouchDragStrategy.latestPointer. This ensures consistent scrolling regardless of the number of fingers you use. For more information about this change, see migration guide .

  • Bug fixes made SingleChildScrollViewand reports of crashes and unexpected behavior have been addressed. ReorderableList2D scrolling has also been fine-tuned to quickly stop scrolling when you drag or tap while scrolling in any direction.

  • Widget TableViewV two_dimensional_scrollablesThe package has received updates offering additional refinement, support for merged cells, and integration of new features from the 2D framework introduced in Flutter 3.16.

Animation style:

  • AnimationStyleNew widget introduced courtesy of Flutter community member @TahaTesser . This widget allows developers to override the default animation behavior in various widgets such as MaterialApp, ExpansionTileAnd PopupMenuButton. Developers now have more control over animation curves and duration.

SegmentedButton.styleFrom Usage:

  • Flutter Community Member @ AcarFurkan presented styleFromstatic utility method, consistent with other button types. This method simplifies the creation, making it easier to share segmented SegmentedButtonbuttons ButtonStyleor setting SegmentedButtonTheme.

Implementation of an adaptive switch:

  • Adaptive Switch, similar to macOS and iOS, was introduced, as well as a Material Design look and feel elsewhere. Regardless of the Cupertino library, this adaptive component maintains a consistent API across all platforms.

  • Cm. request to enable adaptive switch and a living example on API pageSwitch.adaptive constructor

SemanticsProperties for accessibility ID:

  • New Availability ID SemanticsPropertiesprovides an important identifier for a semantic node in its own accessibility hierarchy. Thanks to community member @ bartekpacia this change affects both engine so platform improving accessibility on Android and iOS.

Advanced access to text widget state:

  • Added support to MaterialStatesControllerAnd TextField. TextFormFieldThis improvement allows developers to listen for MaterialState changes, offering more dynamic control over the states of text widgets.

Undo history stack improvements:

  • Eliminated problem , which could cause the undo/redo history to disappear on Japanese keyboards. Now you can enter into the record changesUndoHistory before it is pushed onto the stack. This provides a more robust and customizable undo/redo experience for users.

These infrastructure improvements in Flutter 3.19 highlight Flutter’s commitment to providing developers with powerful tools and capabilities that allow them to easily create high-quality, feature-rich applications.

Engine modernization

Flutter 3.19 marks significant updates to the engine, especially with notable progress made in Impeller, the rendering engine at the heart of Flutter. Let’s dive into the key aspects of these engine improvements:

Progress of Impeller in Android OpenGL

In the previous stable version 3.16, Flutter invited users to try Impeller on Vulkan-enabled Android devices, which covers 77% of Android devices in use. In the following months, the OpenGL Impeller backend underwent significant improvements, achieving functionality similar to its Vulkan counterpart. It is noteworthy that it was added ​​MSAA support , which ensures Flutter apps render correctly on almost all Android devices. While some features such as custom shaders and full support for external textures are on the horizon, developers are encouraged to update to the latest stable version and report any flaws they find. This valuable feedback is critical to making Impeller the default renderer in the next release.

Roadmap for future development

After ensuring rendering accuracy, we focus on performance during the Impeller for Android preview period. We continue to make incremental progress, but there are also a couple of larger improvements in the works. We expect the work to take advantage of Vulkan sub-passages to significantly improve the performance of advanced blend modes. Additionally, we also expect that changing the rendering strategy to Stencil-then-cover will significantly reduce Impeller CPU usage on both Android and iOS. Finally, we expect the new implementation Gaussian blur will match the bandwidth of Skia’s implementation and improve idiomatic use of blur in iOS.

API improvements

Glyph Information

This release introduces two new methods for dart:uiParagraph object: getClosestGlyphInfoForOffsetAnd getGlyphInfoAt, each of which returns an object of a new GlyphInfo type. Developers can review the documentation for the new GlyphInfo type for more information.

GPU Tracing

On Impeller on Metal (iOS, macOS, Simulator) and Vulkan-enabled Android devices, the Flutter engine now exposes the GPU time for each frame in the timeline, available in debug and profile builds. DevTools users can check GPU frame timing under the “GPUTracer” heading, providing improved visibility into performance metrics.

With these engine updates, Flutter 3.19 ensures that developers can leverage advanced rendering capabilities, improved performance, and enhanced API functionality to create even more engaging and efficient Flutter apps.

Please note: Because Android devices that do not support Vulkan may incorrectly report their support for GPU sync request, Impeller GPU tracing can only be enabled via a flag set in the file AndroidManifest.xmlon these devices.

<метаданные android:name= "io.flutter.embedding.android.EnableOpenGLGPUTracing" android:value= "true" />

Performance optimization

Flutter 3.19 introduces significant updates to the engine, improving performance and adding new features that improve the quality of application development.

Specialization Constants for Improved Performance

Impeller engine now supports specialization constants – a feature that significantly reduces the size of the uncompressed binary file of the Flutter engine almost 350 KBincreasing overall productivity.

Background filter acceleration

This release makes significant improvements to the performance of background filters and blur in Impeller. By removing the opportunity reading screen texture, in scenes with multiple background filters, performance increases by 20-70%, depending on complexity. Moreover, Impeller no longer unconditionally saves the stencil buffer for each background filter, resulting in significant improvements in GPU frame processing time and raster stream processor time.

Android improvements

Web deep link validator

  • A new Flutter deep link validator has been introduced, simplifying the implementation of deep links. Developers can now check configuration assetlinks.jsonfiles on Android, ensuring proper configuration and providing implementation guidance.

Share.invoke support

  • Share button by default, previously missing from Android, is now added in this release, making all context menu buttons universally available by default on every platform. You can keep up with ongoing work at PR #107578 .

Native Resources Feature Update

  • Flutter 3.19 simplifies calls FFI through native resources on Android, improving compatibility with other languages’ features in Flutter code.

Texture layer in hybrid composition mode

  • Google Maps and Text Magnifier now run in Texture Layer Hybrid Composition (TLHC) mode, promising better performance for apps that use these features.

Customizable system-wide text selection toolbar buttons

  • Android apps can now include custom text picker menu items in all text picker menus, allowing for greater Flutter picker menu flexibility TextField.

iOS improvements

Flutter iOS native font integration

  • Flutter text on iOS now more closely follows Apple’s design guidelines, with smaller fonts spaced less densely to improve readability and larger fonts appearing more compact to save space.

With these engine updates, Flutter 3.19 continues to improve the development environment, offering improved performance, optimized functionality, and improved visual aesthetics on Android and iOS platforms. Developers can explore these improvements to create even more complex and responsive applications.

Developer Tools Updates

Discover the latest DevTools enhancements with Flutter 3.19, designed to improve your development experience and streamline your debugging and profiling workflows. Here’s an overview of the main improvements:

Checking deep links on Android:

  • DevTools now has a new tool and screen designed to test how deep links are configured on Android. This ensures a smooth and error-free deep link integration process, enhancing your app’s navigation capabilities.

Advanced tracking of platform channel activity:

  • Explore the new menu option “Improved tracking” , specially designed to track the activity of platform channels. This addition proves invaluable for applications that use plugins because it provides insight into the interactions between Flutter and native code.

Availability of performance and CPU profiling screens:

  • Performance and CPU profiling screens are now available even when no application is connected. Previously saved performance data or CPU profiles can be reloaded and viewed directly from these screens, providing flexibility when analyzing application performance.

Flutter Sidebar Improvements in VS Code:

  • The Flutter sidebar in Visual Studio Code (VS Code) has been improved. It now allows you to enable new frameworks if they are not enabled for the current project. Additionally, the DevTools menu in the sidebar offers a convenient option to open DevTools in an external browser window, providing a seamless and customizable development environment.

To learn more, check out the DevTools release notes. 2.29.0 , 2.30.0 And 2.31.0 .

Desktop development

Windows Arm64 support.

Flutter for Windows now has initial support for Arm64 architecture thanks to the commendable efforts of a community member @pbo-linaro . This initial support paves the way for more efficient and performant Flutter apps that run natively on Windows Arm64 devices. Although this move is still in development and progress is being tracked on the GitHub issue #62597 it marks a promising improvement for Flutter developers looking to optimize their apps for a wider range of Windows devices.

With support for Windows Arm64, Flutter developers gain access to a wider audience and can optimize their applications for a wider range of Windows devices. This move not only enhances Flutter’s versatility, but also opens up exciting opportunities for innovation and growth in the desktop development space.

Ecosystem progress

Privacy manifesto for iOS

Flutter now includes an iOS privacy manifest that meets Apple’s future requirements .

Third-party SDKs enhance the functionality of the application, but may affect user privacy. Developers must be careful about data collection methods. Apple introduced privacy manifests and SDK signatures at WWDC23 to improve transparency. Privacy manifests detail the privacy practices of third-party code, making it easier to create privacy labels. SDK signings ensure SDK integrity during version updates, increasing the security of the software supply chain. Starting in Spring 2024, content on the App Store must include privacy manifests and signatures for listed SDKs. This requirement applies to new applications and updates that contain the listed SDKs. Compliance ensures transparency and integrity in application development and maintains user privacy.

Flutter and Dart package ecosystem progress

The ecosystem of Flutter and Dart packages remains key to allowing developers to create beautiful, powerful apps for any screen from a single code base. In 2023, the ecosystem grew by 26%: from 38,000 packages in January to 48,000 at the end of December.

As of January 2024, Pub.dev has over 700,000 monthly active users. The Flutter team remains interested and committed to supporting this growth in the future, as well as providing opportunities for developers to create and contribute to Flutter and Dart. In this update, we’ll take a look at the latest Flutter favorites and results from the Package Ecosystem virtual summit, as well as share some notable updates and must-know information.

If you missed it, check out the January blog post about development of the ecosystem of Flutter and Dart packages .

Outdated versions and breaking changes

In its relentless pursuit of progress, Flutter 3.19 introduces some important changes and game-changers to steer development towards more secure, streamlined and feature-rich environments. Here’s what you need to know:

End of support for Windows 7 and 8:

  • As Flutter evolves, we are adapting to the latest technologies by ending support for Windows 7 and 8 with Dart 3.3 and Flutter 3.19 releases. This strategic shift, aligned with Microsoft’s approach, allows us to focus on improving Flutter for modern operating systems. We understand the changes that may be required of our developers and are ready to help you with this transition. This step lays the foundation for a more secure, efficient, and feature-rich development environment on supported versions of Windows. We value your insight and adaptability as we collectively innovate in the Flutter ecosystem.

Deprecation of the impeller washout flag:

iOS 11 obsolescence:

  • Flutter says goodbye to iOS 11 support due to runtime crash called by some network APIs. Consequently, apps built with Flutter 3.16.6 and later will not be compatible with devices running iOS 11. We appreciate your flexibility as we make these changes to provide a more stable and reliable development environment.

Details about the legacy auto rendering mode:

  • This issue features breaking changes , including the deprecation of APIs that expired after the release of version 3.16. Please refer to the end of support guide for this release to identify all affected APIs as well as additional context and migration instructions. The Flutter patch, combined with the IDE’s quick fixes, supports many of these legacy versions. Bulk patches can be effectively implemented using dart fixcommand line tool. As always, we sincerely thank the community for participation in testing and assistance in identifying and eliminating critical changes . Additionally, please note that this release marks the inclusion of the flutter_driverto the end of support policy, joining the ranks of already supported packages such as flutterAnd flutter_test.

Conclusion

Flutter’s evolution into the powerful and effective toolkit it has become is a direct testament to the dedication and hard work of our incredible community. Heartfelt thanks to each of you.

To dive deeper into the specifics of what was achieved in this release, we invite you to review release notes and changelog for a complete list of additions in Flutter 3.19.

Flutter 3.19, along with Dart 3.3 , is now available in a stable version. Embarking on this newest journey with Flutter is as easy as running a Flutter update.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *