Preparing the Dart and Flutter ecosystem for null safety

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

Kevin Moore
Feb 16 · 2 min read
Image for post
Image for post

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.

Image for post
Image for post
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 is a client-optimized language for fast apps on any platform.

Thanks to Kathy Walrath

Kevin Moore

Written by

Google Product Manager working on Dart and Flutter web technologies.

Dart

Dart

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

Kevin Moore

Written by

Google Product Manager working on Dart and Flutter web technologies.

Dart

Dart

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

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

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