$fvm flutter run
Running "flutter pub get" in flutterweb...
The current Dart SDK version is 2.13.4.
Because flutterweb requires SDK version >=2.14.0 <3.0.0, version solving failed.
I have this error.
Hoever --version is 2.14.2
$ dart --version
Dart SDK version: 2.14.2 (stable) (Wed Sep 15 12:32:06 2021 0200) on "macos_x64"
in pubspec.yaml
environment:
sdk: ">=2.14.0 <3.0.0"
Where should I check??
CodePudding user response:
I did it this way: Open the cmd
as Administrator, and run:
flutter upgrade
This works for me.
CodePudding user response:
Which Flutter version are you using? 2.5?
Because different flutter versions require different dart versions. You should try flutter upgrade
and if that doesn't fix it, try flutter channel stable
.