10

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?

2

5 Answers 5

13

In the Flutter install directory execute

git checkout v1.2.2

Now run

flutter doctor
Sign up to request clarification or add additional context in comments.

2 Comments

my current version is Flutter 1.2.1 so wont this be upgrading... How do i find out which version of flutter supports dart >=1.23.0 <2.0.0
checked out to v1.0.0
8

You can just go from a version to another using the new commands

  • flutter downgrade -> go to the previous
  • flutter upgrade -> update to the new one

2 Comments

I would like to go to the flutter version that was previously installed. I think it is 1.22.4. Please help me out here. Thank you.
@SemiDeveloper is flutter downgrade working for you?
5

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

1 Comment

The new command is: ``` Warning: "flutter version" will leave the SDK in a detached HEAD state. If you are using the command to return to a previously installed SDK version consider using the "flutter downgrade" command instead. ```
4

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

Comments

1

Based on this,

In the Flutter install directory execute

git fetch

then

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.