|Flutter Improves Performance|
|Written by Kay Ewbank|
|Tuesday, 14 September 2021|
There's an updated version of Flutter with improvements including performance and feature improvements to help users track down performance problems in their own apps, full screen support for Android, updated text editing to support switchable keyboard shortcuts, and a better Widget Inspector.
Flutter is Google's open source mobile UI framework for crafting native interfaces on iOS and Android. It was created as a combination of Google's Dart programming language and a runtime environment that is referred to as an app engine in Flutter.
Dart is a C-type, block-structured language with objects that Google developed but that failed to achieve support in browsers other than Google Chrome. Flutter's runtime environment enables apps created in it to run outside browsers, and the runtime environment for Android and iOS creates apps that are close to native.
The new release has several performance improvements, starting with one designed to cut worst case frame rasterization times by two thirds. Work has also been carried out on the garbage collector to reduce the number of collections made. In one test, the changes made reduced the number of garbage collections from over 400 to just four for playing a particular animated gif. Fewer major GCs means that animations involving images appearing and disappearing will have less jank, and consume less CPU and power. There are several other performance improvements to reduce latency.
The new version comes with Dart 2.14, and this new release of Dart adds improved formatting to make cascades more clear, new pub support for ignoring files, and new language features, including the return of the triple shift operator. The new release also includes a standard set of lints shared between new Dart and Flutter projects.
The framework now correctly supports Android full screen modes, and more support has been added for the new Material You (aka v3) specification, including updates to floating action button sizes and theming.
Flutter DevTools is another area to have been improved, with new ability to take advantage of engine updates. The Flutter engine now also identifies shader compilation events in the timeline, and Flutter DevTools uses these events to help you diagnose shader compilation jank in your app.
The Visual Studio Code plugin for Flutter has been improved, and the plan is that in coming releases, the existing Dart and Flutter test runner will be removed in favor of the new Visual Studio Code test runner.
Flutter 2.5 is available now.
or email your comment to: email@example.com