This is how I solved it,
Read moreHow do you change the current dart sdk in flutter?
So, how do I change the current Dart SDK version? You have a separate installation of the Dart 2.7. 2 SDK in your PATH . You probably should remove it and just use the Dart SDK that comes with the Flutter SDK .
Read moreWhat is the latest version of dart sdk?
The Dart SDK has three release channels:
Read moreHow do I update my Mac dart sdk?
Open one terminal and paste the below command:
Read moreHow do you fix a Flutter?
Quick Clean Cache
Read moreHow do I change my Flutter SDK?
There are several ways to upgrade or downgrade the Flutter SDK version. It can be done by changing the git branch of the Flutter SDK repository , changing the channel, or downloading a specific version from their website. To upgrade to the latest version, you can use the flutter upgrade command.
Read more