Flutter 3.19: What's To Expect
5 minutes read
Audio description available
March 25, 2024
After three months, the Flutter team has moved up from version 3.16 to the new 3.19 stable release, bringing lots of improvements and new things to try. In this blog post, we'll take a close look at what's new, using pictures and code in Flutter 3.19 to help us understand. Let's get started!
![flutter 3.19 banner](/web/image/53776-7f5147cf/flutter%203.19.png?access_token=42ce5611-d774-4ff1-8f05-cda8ca9c4486)
A Brief Introduction To Flutter
Flutter is an open-source UI software toolkit created by Google. It enables developers to develop visually stunning and swift mobile applications across various platforms, including Android, iOS, Windows, Linux, and Fuchsia.
The stand-out feature of Flutter is its ability to use a single codebase for multiple platforms. This means you only need to write your app's code once, and then it can work on both iPhones and Android phones. This is great for businesses or startups because it saves money and time since they don't have to make separate versions of their app for different devices. That's why many choose Flutter when they want to make a new app.
Alibaba, Google Ads, Google Pay, and the New York Times are notable apps created with Flutter.
Read also: Decoding Cross-Platform Mobile Development: React Native vs. Flutter in 2023Introducing Flutter 3.19
Flutter 3.19, released on February 16, 2024, quickly caught the attention of the Flutter community with its exciting new features.
This version introduced a dedicated Dart SDK for Gemini and a widget that offers developers more precise control over animations. It also improved rendering speeds thanks to updates to Impeller, added tools for deep link integration, introduced support for Windows Arm64, and included many other enhancements, significantly upgrading Flutter's development toolkit.
Let's delve into the most thrilling new updates introduced in Flutter 3.19.
AI Integration
The Google AI Dart SDK has now entered its beta phase, unlocking the potential to integrate generative AI capabilities into your Dart or Flutter applications. This innovation is powered by Gemini, Google's newest suite of AI models. Developers can access the google_generative_ai package on pub.dev, paving the way for enhanced AI features in their apps.
Frameworks
Scrolling Enhancements
Flutter has significantly enhanced the scrolling experience. Previously, using two fingers for scrolling resulted in a doubled speed, a feature that's now customizable. By configuring the default ScrollBehavior with MultiTouchDragStrategy.latestPointer, scrolling becomes consistent, regardless of how many fingers are used. This adjustment aims for a more intuitive interaction, as detailed in the accompanying migration guide.
The 3.19 release marks the completion of important bug fixes for SingleChildScrollView and ReorderableList. These updates address several issues, including crashes and unexpected behaviors, improving the stability and reliability of these components.
In terms of two-dimensional scrolling, Flutter 3.19 resolved an issue ensuring that any in-progress scroll can be stopped immediately with a drag or tap. This fix enhances user control over scroll activities, making navigation more predictable and fluid.
Significant updates have been made to the TableView widget in the two_dimensional_scrollables package. Since the last stable release (3.16), the widget has seen improvements in polish, now supports merged cells, and better adopts the features of the 2D foundation, providing a richer user experience.
Introduction of AnimationStyle
Flutter 3.19 introduces the AnimationStyle widget, allowing developers to customize default animation behaviors in widgets like MaterialApp, ExpansionTile, and PopupMenuButton. This means developers can now tailor animation curves and durations to their specific needs, offering more flexibility in design.
SegmentedButton.styleFrom
A new styleFrom static utility method, akin to those available for other button types, has been added in Flutter 3.19. This method facilitates the quick creation of a SegmentedButton’s ButtonStyle, enabling easy sharing across segmented buttons or configuring the app’s SegmentedButtonTheme.
Adaptive Switch Component
The adaptive switch component introduced provides a native look and feel on macOS and iOS, while maintaining the Material Design aesthetics on other platforms. Notably, it achieves this without relying on the Cupertino library, ensuring a consistent API across all platforms.
SemanticsProperties Accessibility Identifier
A notable addition is the accessibility identifier in SemanticsProperties, offering a way to specify identifiers for semantic nodes in the native accessibility hierarchy. This feature spans the engine and framework, enhancing accessibility support on Android and iOS.
Enhanced Text Widget State Access
A big improvement over Flutter 3.7. Flutter 3.19 now supports a MaterialStatesController in TextField and TextFormField, allowing for the monitoring of MaterialState changes. This enhancement provides developers with increased control and customization options for text input widgets.
UndoHistory Stack Fix
The latest update fixes an issue with the undo/redo history on Japanese keyboards, where the history could unexpectedly disappear. Modifications can now be made to an entry before it’s added to the UndoHistory stack, ensuring a more reliable text editing experience.
You may interest: Python Flet: The Fastest Way To Build Flutter App With Python
Android
Flutter's Deep Linking Validator
Version 3.19 of Flutter introduces a tool designed to simplify the deep linking process, which developers often find tricky. This early version specifically checks web-related configurations on Android, validating the setup of assetlinks.json. By importing your Flutter project into DevTools, you can easily check if everything is set up correctly. Future enhancements will include checks for iOS web configurations and app checks on both Android and iOS, aiming to streamline the deep linking setup.
Share Button Integration
The latest update adds the default Share button to Android's text fields and views. This ensures that all standard context menu options are consistently available across different platforms, improving the app's user interface.
Native Assets and FFI Calls
Flutter now supports better interoperability with other programming languages through Foreign Function Interface (FFI) calls, introducing Native assets on Android. This feature allows Flutter apps to more easily integrate and utilize functions from different programming languages, broadening the scope of app development.
Enhancements in TLHC Mode
With version 3.19, Flutter has improved the Texture Layer Hybrid Composition (TLHC) mode. These improvements, particularly for Google Maps and text input magnifiers, are aimed at boosting app performance and enhancing the user experience.
Custom Text Selection Toolbar
Flutter's update enables the customization of the system-wide text selection toolbar. Now, developers can add custom menu items from Android apps into Flutter's TextField selection menu, offering a more tailored and intuitive text selection experience to users.
iOS
Flutter 3.19 has enhanced the appearance of text in iOS apps, making it more compact and in line with Apple's design principles. Now, smaller fonts are spaced appropriately to improve readability, and larger fonts are made more compact to conserve space. This update corrects Flutter's previous approach of applying uniform spacing across all text sizes, ensuring that text now feels more native on iOS devices.
DevTools
DevTools Updates: Highlights of the New Release
- A new feature for validating Android deep links has been introduced.
- The enhanced Tracing menu now includes tracking for platform channel activity, greatly aiding plugin-based app development.
- Performance and CPU profiler screens can now be used independently of a connected app, enabling the reloading of previously saved data.
- The Flutter Sidebar in VS Code has been updated to support new platforms and includes an option to launch DevTools in an external browser window.
Desktop
Windows Arm64 Support
Flutter's introduction of initial support for Windows Arm64 marks a significant step towards improving performance for apps on Windows Arm64 devices. This development is an ongoing process, with progress detailed in GitHub issue #62597. It opens up new avenues for optimization for Flutter developers targeting the Windows platform.
Conclusion
In sum, this article highlights some of the exciting new features of Flutter 3.19. To dive into the specifics of what has been achieved with this release, please view the release notes and change log for a comprehensive list of additions in Flutter 3.19.
At BHSoft, a top software company in Vietnam, we're experts in the latest technologies, including Flutter app development. Our skilled Flutter programmers are ready to support your project, whether you need help with development or are looking to hire experts. We have a global track record of meeting diverse business needs with our expertise.
Our team brings the experience needed to deliver top-notch Flutter services, proven by our strong history of successful projects. We're always here to address any questions or issues you might have.
If you're interested in learning how we can help with your Flutter development needs, please reach out to us today.