In my project I am using flutter package new_version_plus but when I use pub get it gives an error as follows:
Because package_name requires SDK version >=2.17.6 <3.0.0, version solving failed.
pub get failed (1; Because package_name requires SDK version >=2.17.6 <3.0.0, version solving failed.)
exit code 1
I made the changes as per required SDK version but still I got the same error.
2
Answers
You need to upgrade flutter using
flutter upgrade
command and then flutter will use latest version of Dart SDK.Update ‘SDK version >=2.17.6 <3.0.0’ like this in
pubspec.yaml
file.pls check new version package official doc example : https://github.com/CodesFirst/new_version_plus/blob/master/example/pubspec.yaml
You should not update the dart version of this project, open
pubspec.yaml
file and updateto