Closed
Description
In Dart 3 only sound null safety will be allowed.
This work items describes the gradual roll-out of this change.
Dart 2.19
- Print an info message in the
dart
tool about the upcoming change:
dart tool: warn about Dart 3 only allowing sound null safety #49924 - Print an info message in the
flutter
tool about the upcoming change:
Update null safety warnings in prep for Dart 3 flutter/flutter#110998).
Dart 3.0 alpha
After the Dart + Flutter development branches (main
/master
) have branched for Dart 3, we need to make the following changes:
- Update the
pub
solver to support backwards compatibility with Dart 2.12 and later packages:
pub client: update solver to support language version 2.12 in Dart 3 pub#3554 - Change the Dart major version number to
3.0
:
https://dart-review.git.corp.google.com/c/sdk/+/271922 - Update templates for 3.0:
- Dart analyzer (whether running in an IDE, in
dart analyze
orflutter analyze
: Error on any library that has a language version below 2.12, except when the flag--no-sound-null-safety
is passed
Analyzer doesn't error on legacy libraries #50694 -
dart run
anddart compile
: Error on any library that has a language version below 2.12, except when the flag--no-sound-null-safety
is passed -
flutter run
andflutter build
: Error on any library that has a language version below 2.12, except when the flag--no-sound-null-safety
is passed -
dart compile js
: ditto
[dart2js] default to sound null safe mode #50345