So, I added two devDependencies in flutter pubspec.yml
:
dev_dependencies:
flutter_test:
sdk: flutter
shared_preferences: ^2.0.0-nullsafety
http: ^0.13.0-nullsafety.0
Both shared_preferences and http versions are based upon null safety. The flutter application is working perfectly before including these.
But after I try running the app I get the following error:
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:plugin_platform_interface
For solutions, see https://dart.dev/go/unsound-null-safety
I am not sure which package has a dependency to plugin_platform_interface
, but how can I solve this without overriding the null-safety rule for code execution?
I don't want to run the code without null-safety.
I didn't include plugin_platform_interface
anywhere in the dependencies but still getting an error with respect to the same package.
Edit: Moving the dependencies to dependencies
from dev_dependencies
doesn't solve the problem. Nor does replacing the versions by any