skip to Main Content

I have just updated to Flutter 3.10 and Dart 3.0 and followed the Dart 3.0 migration steps shown here and running "dart analyze" shows no errors.
However when I ask VSCode to run my tests all I get is:

Could not find an option named "no-sound-null-safety".

Run ‘flutter -h’ (or ‘flutter -h’) for available flutter commands and options.

Exited (1)

I have updated Dart Code to v3.64.0 in VSCode but I still get the same error.

If I run "flutter test" in the VSCode terminal the tests all run as expected.

Any idea how I can get the tests running in VSCode again?

Thanks

2

Answers


  1. As of Dart 3.0, sound null safety is required, and this option no longer exists. In your settings.json for the workspace & user, find & remove the "--no-sound-null-safety" argument in the "dart.flutterAdditionalArgs" setting.

    You may also search for the Flutter Additional Args section of the settings and remove there.

    If you are not yet ready to run with sound null safety, your only option is to downgrade Dart/Flutter. flutter downgrade

    Login or Signup to reply.
  2. And for Android Studio, goto : Run –> Edit Configurations. Remove "–no-sound-null-safety" from Additional run args

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search