flutterdartandroid-studiodependenciesnull-safety

How to fix "Cannot run with sound null safety" error in Flutter?


I'm encountering the following error in my Flutter project (Android Studio):

Error: Cannot run with sound null safety, because the following dependencies don't support null safety:

* package:fl_chart
* package:equatable
* package:path_drawing
* package:path_parsing

For solutions, see https://dart.dev/go/unsound-null-safety

How can I resolve this issue and run my project?


Solution

  • When I search pub.dev for the packages, I see all the mentioned packages support null safety. You just need upgrade the version of packages. flutter pub upgrade --major-versions