Preparing the Dart and Flutter ecosystem for null safety

Null safety is now API stable. Publish your stable packages now!

Kevin Moore
Dart
Published in
2 min readFeb 16, 2021

--

Today we’re announcing a new beta release of Dart. This beta represents a new level of stability and confidence in the new sound null safety type system, which we’ve been working on for over a year. The updated Dart beta (2.12.0–259.9.beta) is available on dart.dev and is also included in the beta channel of Flutter. We don’t anticipate any more breaking changes between now and the stable release of this feature.

If you’re a package developer, we invite you to begin publishing stable, null-safe versions of your packages to provide the best experience for users when we ship the stable version of Dart with null safety. We’ve started this process ourselves, publishing stable versions of null-safe packages such as args, yaml, and grpc. If all of your dependencies are null-safe and published with stable versions (e.g. 1.0.0 instead of 1.0.0-nullsafety.123), now is the time for you to do the same!

We’ve also added a new feature to pub.dev that tags package versions as preview releases when their dependent Dart SDK hasn’t yet been released to stable. Preview releases will automatically be promoted to regular stable versions once a new stable Dart SDK is released.

pub.dev showing the args package with a 1.6.0 stable version and a 2.0.0 preview version

The null safety migration guide has the latest information on how to migrate your packages. Pay close attention to the Dart SDK constraint and versions of your dependencies in the pubspec, as well as the version of the SDK that you’re using in continuous integration (CI) testing.

The stable, null-safe version of Dart is coming soon! Thanks for helping us make it happen.

--

--

Dart
Dart

Published in Dart

Dart is an approachable, portable, and productive language for high-quality apps on any platform. Learn more at https://dart.dev.

Kevin Moore
Kevin Moore

Written by Kevin Moore

Google Product Manager working on Dart and Flutter web technologies. Find all of my social links at https://j832.com

No responses yet