Preparing Dart and Flutter ecosystems for the transition to null safety

The null safety train rushes forward, Flutter 2.0 is almost officially announced (connect to the upcoming Flutter engage), the Dart ecosystem is also moving forward. We have translated into Russian the news from the official Dartlang blog and we strongly recommend that you move your packages to the new rails if you haven’t already!

Stable API for null safety released

Recently, a new beta version of Dart has been released, which is characterized by increased stability and availability reliable null safety a system we have been working on for over a year. The updated beta (2.12.0–259.9.beta) is available at dart.dev and on Flutter beta channel… Until the stable version of null-safe Dart is released, breaking changes are no longer expected.

We encourage developers to publish null-safe versions of their packages so that users can get the full functionality of the ecosystem at the time the stable version of null-safe Dart is published. We ourselves have already launched this process – we published stable versions of null-safe packages, such as args, yaml and grpc… If all your dependencies are null-safe and published under a stable release (e.g. 1.0.0 instead of 1.0.0-nullsafety.123), it’s time for you to do the same!

We’ve also added a new feature to pub.dev, which itself marks package versions by marking preview releasesif the stable version of the dependent Dart SDK hasn’t been released yet. Preview releases will be automatically marked as stable as soon as the stable Dart SDK is released.

Stable (1.6.0) and preview (2.0.0) versions of args package on pub.dev
Stable (1.6.0) and preview (2.0.0) versions of args package on pub.dev

The null safety transition guide there is all the latest information on how to organize your package migration. Pay special attention to the limitations of the Dart SDK and the pubspec version of your dependencies. This includes the version of the SDK you are using for continuous integration (CI) testing. The stable null-safe version of Dart is coming soon! Thank you for support!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *