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
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.
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.
- android_alarm_manager -> android_alarm_manager_plus
- android_intent -> android_intent_plus
- battery -> battery_plus
- connectivity -> connectivity_plus
- device_info -> device_info_plus
- package_info -> package_info_plus
- sensors -> sensors_plus
- share -> share_plus
- wifi_info_flutter -> network_info_plus
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:
CPU profiler now allow to filter out event sources or visualize records in different colors distinguishing these sources:
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 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:
Convenient static methods to calculate object’s hash code:
hashAllUnordered which help to reduce boilerplate code incorporating each element‘s hash code (not the list’s instance hash code as would be with
int get hashCode => Object.hashAll(_sampleInternalList);
DateTime has been fixed to better support daylight time change saving with 30 minutes precision.
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
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.