3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Flutter Null Safety を無効化したい

Last updated at Posted at 2021-09-17

flutterのバージョンが2.0になったことにより、Null Safetyが導入されました。

flutter2.0ではあるがNull Safetyを無効化し、現段階ではNullableで開発したいという一時的な状況もあるかと思います。

そのための方法を紹介します。

pubspec.yaml
environment:
  sdk: ">=2.12.0 <3.0.0"
      #2.12.0以上の可能性もあります

から

pubspec.yaml
environment:
   sdk: ">=2.7.0 <3.0.0"

にプロジェクトが許容するSDKの最低バージョンを下げてください。そうすればNull Safetyを無効化できます。

3
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?