Reputation: 1088
My current Dart SDK Version is 2.1.2-dev.0.0.flutter-0a7dcf17eb. However i need to use a flutter text recognition Dependency that requires SDK version >=1.23.0 <2.0.0
How can I downgrade my version?
Upvotes: 10
Views: 33399
Reputation: 181
Based on this,
In the Flutter install directory execute
git checkout <version number>
Eg: git checkout 3.13.7
, notice there is no 'v' prefix in front of version number instead just write the version directly
Now run
flutter doctor
Upvotes: 1
Reputation: 1363
You can just go from a version to another using the new commands
flutter downgrade
-> go to the previousflutter upgrade
-> update to the new oneUpvotes: 8
Reputation: 2598
You have to run one command
flutter version
Above command shows you list of flutter version after that you can choose any version from that list. Using for example flutter version v1.9.1+hotfix.6
Upvotes: 4
Reputation: 1282
If you have a specific version of Flutter that you want to switch to (e.g. a previous stable version), you can use the flutter version
command:
First find the version you wish to switch to here: https://flutter.dev/docs/development/tools/sdk/releases
Then, use flutter version
command:
flutter version v1.9.1+hotfix.3
To pin Flutter package to a specific version, specify Flutter version explicitly in the pubspec.yaml file environment section:
environment:
sdk: '>=1.19.0 <3.0.0'
flutter: ^0.1.2
Upvotes: 5
Reputation: 177
In the Flutter install directory execute
git checkout v1.2.2
Now run
flutter doctor
Upvotes: 13