Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to downgrade flutter version

I updated my flutter version by flutter upgrade --force command and now my project doesn't compile is there is a way to downgrade to old version (i dont know my old version number)

please help me because this is my graduation project

like image 702
iKaka Avatar asked Mar 14 '21 01:03

iKaka


People also ask

How do I downgrade to flutter version?

To Downgrade Flutter SDK First of all Open your Terminal. Then type flutter version It will return all flutter version list. Choose the version that you want to downgrade. Just run the flutter version Suppose I want to use flutter version v1.

How do I change my flutter version?

There are several ways to upgrade or downgrade the Flutter SDK version. It can be done by changing the git branch of the Flutter SDK repository, changing the channel, or downloading a specific version from their website. To upgrade to the latest version, you can use the flutter upgrade command.


2 Answers

For change the Flutter sdk version use this command: For upgrade the latest version:

flutter upgrade 1.20.0 //version number

For decrease the Flutter sdk version:

flutter downgrade 1.18.0 // version number

And for check the version which you Currently used:

flutter --version

like image 32
Amit Singh Avatar answered Sep 25 '22 23:09

Amit Singh


If you're seeing the message:

There is no previously recorded version for channel "stable".

Navigate to your Flutter installation folder and run git checkout flutter_version

If you're using snap on Linux and want to downgrade to 1.22.6:

cd $HOME/$USER/snap/flutter/common/flutter
git checkout 1.22.6
flutter --version
like image 56
Eleandro Duzentos Avatar answered Sep 25 '22 23:09

Eleandro Duzentos