Next major update of Flutter & Dart is here! As Medium’s blog shows, one another big release:

4600 issues closed and 3932 PRs merged from 252 contributors with 216 reviewers.

medium.com/flutter

For packages on pub.dev, 100% of the top-250 packages now support null safety, and 94% of the top-1000 support it.

medium.com/dartlang

Flutter 2.5

Smoother UI

No animation junks with long-awaited capability to pre-compile iOS Metal shaders: #25644.

No interruptions of UI thread’s frames rendering with background microtasks interference: #25789.

Performance

Reducing GC impact with proper memory reclaims: #26219, #82883, #84740.

Native API interop optimizations for lower messaging latency: #25988, #26331.

Framework

Android has got major enhancements with Fullscreen support with different modes:

  • Lean back: system overlays go into view by tapping anywhere on the screen & this tap is not received by the application
  • Immersive: system overlays go into view by swiping at the edge of the screen & this swipe is not received by the framework
  • Immersive sticky: system overlays go into view by swiping at the edge of the screen & this swipe is received by the framework
  • Edge to edge: the application takes up the fullscreen, with the overlays hovering on top

Material You notation gets the support, with Floating Action button sizes & theming, scrolling, Material Banners, text editing including shortcuts customization.

Plugins also received development focus. Camera & Image Picker have been enhanced. A range of plugins have been deprecated and now should be replaced with a community-driven “plus” alternative:

DevTools

Frames chart is now “live” populating frames dynamically as they’re rendered and allowing to navigate into Timeline view to see the frame-specific tracing events. Also Timeline shows shaders compilation events:

https://medium.com/flutter/whats-new-in-flutter-2-5-6f080c3f3dc

CPU profiler now allow to filter out event sources or visualize records in different colors distinguishing these sources:

https://medium.com/flutter/whats-new-in-flutter-2-5-6f080c3f3dc

Widget Inspector now provides more details and also allows to evaluate expressions while debugging. More improvements are on the roadmap as Flutter team has engaged with a dedicated vendor to support the development tool.

Dart 2.14

An illustration with text that summarizes the new 2.14 features

Language

Dart language has got some new specific features:Triple Shift ">>>" operator which means a logical right-shift operation (also known as “zero-fill right shift”) against int, see the specification for details

Generic function types are now allowed as type arguments, like:

late S Function<S extends T Function<T>(T)>(S) f; 

Annotations can now receive type arguments, like:

@ProductFamilyController<int>(1)

Core

Convenient static methods to calculate object’s hash code: hashAll and hashAllUnordered which help to reduce boilerplate code incorporating each element‘s hash code (not the list’s instance hash code as would be with _sampleInternalList.hashCode):

int get hashCode => Object.hashAll(_sampleInternalList);

DateTime has been fixed to better support daylight time change saving with 30 minutes precision.

SDK

Flutter apps on stable channel now run natively on ARM (Silicon M1 chip) iOS Simulator: #85642, you need Dart 2.14.1+ for that, just choose ARM64 option when downloading the macOS SDK.

C interop with Foreign Function Interface (FFI) has got C typedef to Dart typedef generation and arena-based memory management mechanism which

New lint collections are published which now considered as default recommended style and format rules for Dart. If you need to migrate from pedantic rulesets, check this link.

Dart formatter has been revised to provide more natural code cascading, #1033.

More flexibility when publishing your package with a new .pubignore file: see the publishing docs.

Faster “dart test” start time with smarter precompiled components reuse: #2962.

Recommendations

Developer:

Adopt

QA engineer:

Trial

PM/DM:

Trial

Leave a comment