How to downgrade Flutter SDK (Dart 1.x)

Flutter is versioned using git. Changing the Flutter version is as simple as changing git branch.

There are 2 different ways:

  • flutter channel <branch> (example: flutter channel stable)

This command is used to change between branches – usually stable/dev/beta/master. We can also put a specific commit id from git.

  • flutter downgrade <version> (example: flutter downgrade v1.2.1)

This command will use a specific version number. You can have the list of the available version numbers using flutter downgrade or here

After this, run any Flutter command (such as flutter doctor), and Flutter will take care of downloading/compiling everything required to run this version.


Run the following command to see a list of available versions.

flutter version 

Then choose a version you want to switch to by running

flutter version v1.2.1

To undo and revert back to stable

flutter channel stable
flutter upgrade

In the Flutter install directory execute

git checkout v0.1.9

then run

flutter doctor

You can check which versions are available in the Flutter GitHub repository https://github.com/flutter/flutter

enter image description here

There is an open feature request to make this easier https://github.com/flutter/flutter/issues/14230


Don't use flutter version vX.X.X, use flutter downgrade instead.

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.

So, you should use

flutter downgrade 

Edit:

If there had been no previous versions installed, the above command would fail. So, if you have a specific version of Flutter that you’d like to switch to, you can use the flutter version command:

flutter downgrade v1.17.0

You can find list of versions here