'flutter: how to downgrade flutter beta channel version

In order to create a flutter web app, I used the command flutter channel beta and flutter upgrade. The result is that my flutter beta channel version is now 2.1.0-12.2.pre, but my flutter stable channel version remains 1.22.4. The problem is that when I open my flutter android app in beta channel, all my files have errors because of null safety change. So I wanted to downgrade my flutter beta channel by using command flutter downgrade v1.26.0-17.8.pre, but terminal says There is no previously recorded version for channel 'beta'. How can I downgrade my flutter beta channel to v1.26.0-17.8.pre in this case?



Solution 1:[1]

You can use Flutter Version Management CLI (fvm) for this. Besides, you can install any Flutter version you want, and switch between them.

Just run fvm use and select a Flutter version you want to use. You can find the documentation on their GitHub repo

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Thomas