13

I have this error when I try to debbug my app, I used to debbug my app with no sound null safety, I update flutter and it doesnt work now, how can I resolve it? enter image description here

enter image description here

7 Answers 7

14

Had this issue, I couldn't even run a new project built with Flutter 3.10 itself.

I use VSCode so all I had to do, is to the settings and search for Additional, check you'll find this.

Remove the --no-sound-null-safety

and also had to go into settings.json and remove another flag related to null safety,

Now I can build with no problem!

11

As of Dart 3.0 there is no support for no sound null safety. You can do flutter downgrade to go back to the last version you had. But I really suggest you try and get your code up to date to null safety since it helps a lot while coding.

6

If you are using android studio, go configurations, and delete the arg "no-sound-null-safety". enter image description here

enter image description here

You might need to run flutter pub upgrade --major-versions, to upgrade all packages, and after that, you might need to amend the code, to make it work with the latest dart, flutter sdk, and packages breaking changes. Some things might be deprecated, or removed at all. If you have an error on a class name, you have to see from which package it was, and go to readme or changelog sections and see the breaking changes for that package.

3

--no-sound-null-safety
this is view my flutter < 3.10 version.
it's could be fix it on change your setting.
Go to VScode setting now search in flutter run add now you view

enter image description here

Change to ->

enter image description here

0

Go to vs code setting and find Flutter Additional Args

then remove added -no-sound-null-safety then its working

0

In my case, I solved this issue by simply running these commands

  1. flutter pub upgrade --major-versions

  2. flutter clean

  3. flutter pub get

  4. and run it flutter run

In my case I did not remove --no-sound-null-safety in run->edit configurations->additional run args:

0

1- Go to main.dart > Edit Configurations... (LOOK TO IMAGE)

enter image description here

2- delete (no-sound-null-safety") in Additional run args: field

enter image description here

enter image description here

RUN YOUR PROJECT ... PROBLEM SOLVED

Not the answer you're looking for? Browse other questions tagged or ask your own question.