Flutter: Null Safety Solutions

Sometimes there is a dependency that does not conform to a null safety but we cannot do anything since it is in the dependency package. So what can we do to solve it?

First, we need to understand what null safety is. And then also understand what the problem will be. If you are sure that you want to run the app with unsound null safety that we can use the following command:

flutter run –no-sound-null-safety

OR 

you can configure your IDE to enable your app to run with unsound null safety.

In VS CODE search for flutter run additional args in your user settings and then add –no-sound-null-safety

  1. Go to Settings. In Mac you can find as in this picture.

2. Search for “Flutter run additional args” 

3. Then click “Add Item”

4. Now type “–no-sound-null-safety”

5. Click ok

Information about unsound null safety is in this link.