Turn off Null Safety for previous Flutter Project?

Setting SDK constraints in your old project’s pubspec.yaml file should be enough.

For example, the following, does not have null safety enabled:

  sdk: ">=2.11.0 <3.0.0"

You can also specify at the top of your Dart file to disable null checks for that file.

// @dart=2.9

Leave a Comment