Flutter 2.5 — What’s New In Flutter
By: Shaiq Khan
Tags: Mobile App Development, Flutter App Development, Devtools, Dart, Flutter

Some of the Key Announcements In Release are ::>

Performance Improvements:

This release accompanies a few performance enhancements. iOS has less jank, burns-through less CPU and power, wiping out jank from this source in our testing, and is more performant now. Additionally, iOS 8 help is deprecated

Frame lag due to processing asynchronous event results before and after

One more reason for jank is the point at which the garbage collector (GC)pauses the UI thread to recover memory. In this release, memory for unused pictures is recovered excitedly, reducing GCs extensively.

GCs before and after adding the fix to eagerly reclaim unused large image memory

One more performance improvement in Flutter 2.5 is the latency when sending messages among Dart and Objective-C/Swift (iOS) or Dart and Java/Kotlin (Android). Eliminating pointless duplicates from messaging codecs diminished latencies by up to half contingent upon message size and device.

iOS message latencies before and after

Dart 2.14:

This release of Flutter comes with Dart 2.14

> Apple Silicon support

> Dart formatter and cascades

> Pub support for ignoring files using .pubignore

> Pub is much smarter and faster

> Flutter Lints is out of the box now.

is out of the box now. > added a new triple shift operator ( >>> )

Breaking changes

> Removed support for ECMAScript5

> Deprecated dartfmt and dart2native commands, and discontinued stagehand

and commands, and discontinued > Deprecated the Dart VM’s Native Extensions

If you want to explore more about Flutter, please visit Announcing Dart 2.14 to get more information.

Framework:

The Flutter 2.5 release includes several fixes and improvements to the framework.

> Android full-screen support

Android, has fixed a bunch of related issues around full-screen modes. New features: lean back, sticky, sticky immersive, and edge to edge. This change additionally added an approach to listen to fullscreen changes in different modes.

Normal mode (left), Edge to Edge mode (center), Edge to Edge with a custom SystemUIOverlayStyle (right)

> Floating action button sizes updated

As part of Material You, users can configure a larger FloatingActionButton if they choose. With this change a FAB can be configured in 4 sizes: small, regular, large, and extended.

New Material You FAB sizes

> MaterialState.scrolledUnder state added to SliverAppBar

Demo::

SliverAppBar(

backwardsCompatibility: false,

elevation: 0,

backgroundColor: MaterialStateColor.resolveWith((Set<MaterialState> states) {

return states.contains(MaterialState.scrolledUnder) ? Colors.indigo : Colors.blue;

}),

expandedHeight: 160,

pinned: true,

flexibleSpace: const FlexibleSpaceBar(

title: Text('SliverAppBar'),

),

),

MaterialState.scrolledUnder action

> ListView now sends notifications of scrollable areas even if the user isn’t scrolling

scrollbar appearing or disappearing as appropriate based on the underlying size of the ListView

> Material banner supports now to the ScaffoldMessenger

In Flutter 2.5, you would now be able to add a banner to the highest point of your scaffold that stays set up until the user dismisses it.

ElevatedButton(

child: const Text('Show MaterialBanner'),

onPressed: () => ScaffoldMessenger.of(context).showMaterialBanner(

MaterialBanner(

content: const Text('Hello, I am a Material Banner'),

leading: const Icon(Icons.info),

backgroundColor: Colors.yellow,

actions: [

TextButton(

child: const Text('Dismiss'),

onPressed: () => ScaffoldMessenger.of(context)

.hideCurrentMaterialBanner(),

),

],

),

),

)

> Camera and Image Picker plugins got so many new features

Camera: show some features are -

3795 [camera] android-rework part 1: Base classes to support Android Camera features

3796 [camera] android-rework part 2: Android autofocus feature

3797 [camera] android-rework part 3: Android exposure-related features

3798 [camera] android-rework part 4: Android flash and zoom features

3799 [camera] android-rework part 5: Android FPS range, resolution, and sensor orientation features

Image Picker:

3898 [image_picker] Image picker fix camera device

3956 [image_picker] Change storage location for camera captures to internal cache on Android, to comply with new Google Play storage requirements

4001 [image_picker] Removed redundant request for camera permission

4019 [image_picker] Fix rotation when the camera is a source

> battery package moved to battery_plus

Besides, since these plugins are at this point not effectively kept up with, they are as of now not set apart as Flutter Favorite plugins. If you haven’t effectively done as such, we prescribe moving to the in addition to renditions of the accompanying plugins:

Flutter DevTools:

This release of Flutter comes with several improvements to Flutter DevTools. First and foremost is the added support in DevTools to take advantage of engine updates.

> Flutter DevTools utilizes these events to assist you with diagnosing shader compilation jank in your application

> New CPU Profiler highlight that empowers you to hide profiler data from any of these sources.

> Now we can easily distinguish codes with colored bars so that you can easily see what parts of the CPU Frame Chart come from what parts of the system.

> This release of DevTools accompanies an update to the Widget Inspector that permits you to hover over a widget to assess the object, view properties, widget state, etc.

When you select a widget, it consequently populates in the new Widget Inspector Console, where you can investigate the widget’s properties.

> To make DevTools a more useful destination for comprehension and debugging your Flutter applications.

IntelliJ/Android Studio:

The IntelliJ/Android Studio plugin for Flutter has also undergone several improvements with this release.

> Starting with the ability to run integration tests support

> The most recent release likewise incorporates the new ability to preview icons utilized from packages from the pub. dev

> To empower icon previews you need to tell the plugin which packages you are utilizing. There is another text field on the plugin settings/preferences page

Visual Studio Code:

> We can add dependencies without leave the VS Code now

> You may also be interested in the “Fix All” command. This can also be set to run on-save by adding source.fixAll to the editor.codeActionsOnSave VS Code setting.

> VS Code has new test runner integration it’s as yet under see. You need to empower the dart.previewVsCodeTestRunner in settings.

> The Visual Studio Code test runner also adds new gutter icons showing the last state of a test that can be clicked to run the test.

Tools:

> Flutter has a new template skeleton

Uses ChangeNotifier to coordinate multiple widgets Generates localizations by default using arb files Includes an example image and establishes 1x, 2x, and 3x folders for image assets Uses a “feature-first” folder organization Supports shared preferences Supports light and dark theming Supports navigation between multiple pages

> Pigeon is v1.0 now

A Pigeon is a codegen apparatus for creating typesafe interop code among Flutter and its host stage. It permits you to characterize a depiction of your plugin’s API and produce skeleton code for Dart, Java, and Objective-C

Conclusion:

In Flutter 2.5— Apparently Described as the biggest release with the 2nd highest stats Flutter history. The update release has created an igniting spark among the mobile developer’s Community by focussing well on varied Important Aspects.

Though Each New Release Certainly Brings with In Increased usage and momentum It can be easily seen that the 4600 issues closed and 3932 PRs merged from 252 contributors with 216 reviewers. If we look back over the last year, we see a huge 21,072 PRs created by 1337 contributors, of which 15,172 of them were merged.

What makes it more special for us is that Our Country, India now being the #1 region for Flutter developers, having doubled in the last six months

❤ ❤ Thanks for reading this article ❤❤

If I got something wrong? Let me know in the comments. I would love to improve.

Clap 👏 If this article helps you.