How to downgrade Flutter SDK (Dart 1.x)

1799    1 year ago

I upgraded my Flutter SDK and now my project is broken. I need to basically revert back to a Flutter SDK which uses Dart 1.x.

I tried the following in the pubspec.yaml,

  sdk: ">=1.19.0 <2.0.0"
  flutter: "^0.1.2"

    sdk: flutter

but now the project just simply doesn't build.

Running "flutter packages get" in binformed...
Package binformed requires Flutter SDK version ^0.1.2 but the current SDK is 0.2.5-pre.38.
pub get failed (1)

Do i need to uninstall the SDK and reinstall it?

Answers { 1 }
1 year ago

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

enter image description here

There is an open feature request to make this easier