'Run unit tests while using --no-sound-null-safety

My app uses the MVP pattern as its main Architecture Pattern which obliges me to run the app with flutter run --no-sound-null-safety. Is there a way to run unit tests (which requires to run the app with just flutter run) while still running the app with this flag ?



Solution 1:[1]

I resolved that by just lowering the sdk version in my pubspec.yaml

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Noivy