The latest edition of Google’s Flutter SDK, version 2.5, offers improved support for full-screen Android applications, Material You widgets, and more, as well as Apple Silicon support for the Dart programming language.
Let’s take a quick look at the new Flutter 2.5 features.
1. Android Full-Screen Mode
Better full-screen support for Android apps is a significant feature in Flutter 2.5. The following new immersive modes are in the update:
Tap anywhere on the screen to bring up the system overlays when you lean back.
Immersive: display system overlays by swiping on the screen’s edge.
Immersive Sticky: identical to Immersive, but the framework handles swipe.
Edge-to-Edge: use transparent system overlays to show application components.
2. Material You
Material You is Google’s most recent iteration of Material Design. Although, Material v3, often known as Material v3, is a substantial overhaul of the Material Design language. New shapes, themes, and even dynamic color effects have been added.
Material You support is now available in Flutter 2.5, with larger FAB sizes and more theme choices. Although it isn’t fully complete, it demonstrates that Google is making progress.
3. Improvements in Scrolling
The new MaterialState.scrolledUnder state lets you see in action with the sample code in the PR (#79999)
The inclusion of scroll metrics alerts that offer notifications about scrollable regions even when the user isn’t scrolling is another enhancement. For example, depending on the underlying size of the ListView, the scrollbar appears or disappears as appropriate.
You don’t need to write any code in this scenario, but you may if you want to catch the ScrollMetricNotificationchanges.
4. Material Banner Support
The inclusion of Material banner support to the ScaffoldMessenger is another great effort from the community. ScaffoldMessenger is a more sophisticated approach to present SnackBars at the bottom of the screen to give users alerts, as announced in the Flutter 2.0 release announcement. You can now put a banner to the top of your scaffold in Flutter 2.5 that will stay in place until the user dismisses it.
5. Plugins for the IDE
The IDE plugins for IntelliJ/Android Studio and Visual Studio Code are in line with the Flutter 2.5 version.
6. Android Studio/IntelliJ
Flutter developers can now run integration tests throughout the whole project using the new IntelliJ/Android Studio plugin. These tests have their own directory and are executed on the device. Coverage reports for unit and integration tests are now available. Finally, when you acquire fonts from pub.dev, a tiny feature allows you to see TrueType font icons in the IDE. It’s a wonderful tool to have, but you have to inform the IDE which packages you’re using, and it only works on static constants.
7. Visual Studio Code
Two new commands have been added to the Visual Studio Code plugin for Flutter to make installing Dart and Dart Dev requirements simpler. A Repair All command has been added to automatically format and fix lint problems in the current file.
A new test runner for Dart and Flutter code is also available in the preview and may be activated in this version. This will ultimately replace the present runner with this new one.
Furthermore, these plugins are no longer marked as Flutter Favorite plugins because they are no longer actively maintained. Flutter experts recommend upgrading to the plus versions of the following plugins if you haven’t already:
Pigeon is a Flutter code generating tool that aids developers in bridging code between Flutter and native platforms. It generates Flutter, Java, and Objective-C stubs using a unique interface descriptor syntax. It’s also null-safe and type-safe. Pigeon 1.0 adds basic functionality to the stable channel, as well as improved error messages, generics, primitives, and multiple arguments support.
9. Dart 2.14
Flutter offers a lot of new features, but the underlying language, Dart, has significant modifications as well.
Apple Silicon Dart 2.14.1 includes improved Apple Silicon support. Apple Silicon’s Dart SDK is now stable, and iOS emulators may now operate on ARM64. Unfortunately, the Dart SDK that comes with the Flutter SDK does not currently support Apple Silicon natively.
Since its inception, Dart has gone through several modifications, including the syntax and stylistic standards that surround it. There has been a considerable misunderstanding about how to correctly format Dart and Flutter code as a result of these changes and the persistence of old-style instructions.
Lint has a set of conditions in Dart 2.14.1 and Flutter 2.5, and these conditions are default.
There’s a lot more in Flutter 2.5 and Dart 2.14 that’s new. You can check out Google’s blog entries on Flutter 2.5 features and Dart 2.14 to learn more about what’s new.
The Tech Platform