38

I work on a Flutter application on two different PC's and would like the Flutter version to be the same for both. I am on the dev channel and when I do a flutter upgrade it ugrades to the latest version in that channel.

Two days ago I did a flutter upgrade on one PC and it went to version 1.2.2. Today on my other PC I did a flutter upgrade 1.2.2 but it went to version 1.3.2 instead.

Is there a way for me to specify the flutter version when upgrading?

1

1 Answer 1

38

This is not yet supported.
There is an open issue for that https://github.com/flutter/flutter/issues/14230

Currently you can use Git commands to get a specific version

$ cd flutter
$ # git checkout [branch, tag or commit hash]
$ git checkout v1.2.2

UPDATE : But after version 1.17.0 tag naming convention has been changed so,

$ cd flutter
$ # git checkout [branch, tag or commit hash]
$ git checkout 3.0.0

Update

flutter downgrade <version> is now supported.

The available versions can be be found in https://github.com/flutter/flutter/tags

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

8 Comments

This is possible now with flutter version. In the console do flutter version to list the versions available. Then choose a version to switch to: flutter version v1.2.1
Sadly, in the Beta channel's (with Flutter 1.23.x, the version command seems to be deprecated: github.com/flutter/website/issues/4935
Updated answer with flutter downgrade here: stackoverflow.com/a/56127174/3758439
make sure you run flutter doctor after flutter downgrade <version>
The use of "downgrade" is incorrect. The downgrade command only downgrades to the previous stable, it does not go to a specific version.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.