0

I accidentally upgraded dart and flutter to the newest version but my code don't support null safety yet. Now I want to downgrade back to dart 1.x.

I tried flutter downgrade v1.2.1 but nothing changed. How can I downgrade back to dart 1.x?

Aryan Beezadhur
  • 4,503
  • 4
  • 21
  • 42
Dalon
  • 566
  • 8
  • 26
  • Does this answer your question? [How to downgrade Flutter SDK (Dart 1.x)](https://stackoverflow.com/questions/49468321/how-to-downgrade-flutter-sdk-dart-1-x) – Nitish Oct 05 '21 at 11:31
  • Yes I followed the top answer and used the command flutter downgrade v1.2.1 but its still with null safety – Dalon Oct 05 '21 at 11:35
  • Did you run flutter doctor after downgrading the dart – Nitish Oct 05 '21 at 11:39
  • check flutter fvm https://fvm.app/ – griffins Oct 05 '21 at 11:41
  • I tried it again. Now I get the error ' There is no previously recorded version for channel "stable". ' when I run flutter downgrade v1.2.1 – Dalon Oct 05 '21 at 11:44

3 Answers3

0

You can downgrade flutter version by following below sequence.

  1. type 'flutter downgrade 1.22.6'
  2. Just type and command. 'flutter verion'

After 1,2 steps, you can see downgrading processing.

KuKu
  • 6,654
  • 1
  • 13
  • 25
0

there is a tool that helps to manage different versions of flutter FVM or you can use

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

Bigfoot
  • 336
  • 1
  • 3
0

If you want to downgrade flutter one the way which I use is to download the required SDK, unzip the folder and replace the existing flutter folder with the downloaded one.

Then restart the editor and you will the version you wanted.

Here are links for the Flutter SDK Release:

Windows https://flutter.dev/docs/development/tools/sdk/releases

MacOS https://flutter.dev/docs/development/tools/sdk/releases?tab=macos

Saheb Singh
  • 1,172
  • 7
  • 13