Published in


Announcing Dart 2.8

Faster package tools, new tool for ensuring dependencies never go stale

Announcing Dart 2.8: Faster package tools, new tool for ensuring dependencies never go stale

Breaking changes paving the way for null safety

A common source of app crashes is code that attempts to use a variable that happens to be null. Sir Tony Hoare, who introduced null references in the ALGOL programming language in 1965, famously called them his “billion-dollar mistake” in a QCon talk in 2009. In some cases null values are useful; the challenge is separating those from the cases where they aren’t. For the past year we’ve been busy building support for sound null safety in Dart. 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.

A higher quality package ecosystem

The pub package manager and pub.dev site power an ever-growing ecosystem for Dart and Flutter. Nearly 10,000 packages are available at pub.dev, and we’re continually amazed by the many interesting packages being shared. It’s been our core mission to help package authors create high-quality packages and to help app developers find those packages — for example, we’ve added improved pub.dev discovery, verified publishers, and Flutter Favorites.

Dart 2.8 pub tool performance improvements

We optimized the performance of the pub tool by adding support for parallel fetching of packages when running pub get, and by deferring pub run precompilation.

Managing dependencies with pub outdated

foo: ^1.3.0
bar: ^2.0.0
version: "1.3.0"
version: "2.0.1"
$ pub outdatedDependencies            Current  Upgradable  Resolvable  Latest
foo 1.3.0 1.3.1 1.3.1 1.3.1
bar 2.0.1 2.1.0 3.0.3 3.0.3
1 upgradable dependency is locked (in pubspec.lock) to an older version.To update it, use `pub upgrade`.1 dependency is constrained to a version that is older than a resolvable version.
foo: ^1.3.0
bar: ^3.0.3
$ pub outdatedDependencies            Current   Upgradable  Resolvable  Latestall up-to-date

Next steps

The performance improvements, breaking changes, and new pub outdated command are available today in the stable Dart 2.8 SDK and in the stable Flutter 1.17 SDK. We recommend that you run pub outdated today to see the health of your dependencies!



Dart is a client-optimized language for fast apps on any platform. Learn more at https://dart.dev.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michael Thomsen

Product Manager working on Dart and Flutter. Helping developers is my passion!