Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Dart and Flutter Improve Performance, Safety, and Tooling for Cross-Platform Mobile Development

Dart and Flutter Improve Performance, Safety, and Tooling for Cross-Platform Mobile Development

This item in japanese


The latest Dart release, Dart 2.8, focuses on preparing the ground for the introduction of null safety and brings an improved package manager. Flutter 1.17 significantly improves runtime performance while reducing binary size and memory usage. Additionally, it introduces a number of new Material widgets, including NavigationRail, updated DatePicker, and more.

Dart 2.8 is paving the way to extend its type system to add support for null safety.

This support will extend the type system to express variables that are always non-nullable, but in addition the type system will be fully sound: the Dart compilers and runtimes will be able to trust those types, and be able to produce optimized code when the type system guarantees that a variable isn’t null.

Adding null safety to an existing language is no easy endeavour and requires a number of breaking changes both in the language and its libraries. In particular, in Dart 2.8 type inference for local variables will not use type promotion. Additionally, type objects will be normalized and mutual subtyping will be preferred over structural subtyping in a number of cases. More breaking changes affect the dart:core, dart:async, and dart:io libraries.

On the tooling front, Dart 2.8 brings much improved performance when retrieving packages from the repository, thanks to support for parallel fetching, and a new pub outdated tool to keep track of outdated dependencies.

Flutter 1.17 promises to improve app performance out of the box:

In this release, you’ll see a 20%-37% speedup for the default navigation case (opaque routes with no transparency). You’ll also see up to a 40% reduction in CPU/GPU usage for simple iOS animations, depending on the hardware.

Additionally, a number of bug fixes help reduce considerably app size and memory usage, up to 70% in particular cases. Thanks to specific work on support for Metal on iOS, Flutter 1.17 grants a 50% performance improvement for most use cases.

As mentioned, Flutter 1.17 also extends its Material widget collection. The new NavigationRail is a navigational widget that can be easily swapped for a BottomNavigator, which is useful for apps that target both the mobile and desktop form factor. Besides a more polished DatePicker, Flutter 1.17 provides better support for text selection, a new Animations package, and modernized text theming, i.e. automatic text scaling based on text style definitions.

On a side note, the latest version of Flutter makes AndroidX mandatory for new projects.

Both releases contain a large number of fixes and breaking changes. Do not miss the official announcements for more detail.

Rate this Article