Today’s topic is about how to downgrade flutter versions. There are a lot of incompatibility problems, or perhaps we want to use other specific versions of Flutter. That is why I am going to address such problems and needs. To be specific, this blog post won’t just teach you how to downgrade flutter versions but how to upgrade, choose, and install specific versions. Let’s get started!
Flutter Version Manager
You might already know such ways to downgrade Flutter versions by just using the Flutter commands, but consequently it is very slow and sometimes it won’t suffice for what we really want to do on our current Flutter versions.
That is why we are going to use a tool called Flutter Version Manager, or FVM, in short. To demonstrate, it facilitates the requirement for consistent app builds by referencing the Flutter SDK version used per-project. It also enables you to install several Flutter versions in order to quickly validate and test upcoming Flutter releases with your apps without having to wait for Flutter installation each time.
Flutter Version Manager Installation
Accordingly, the Flutter Version Manager can be installed in many ways, and it can also be installed on MacOS, Windows, and Linux. Open your command prompt in Windows and try the command below. If you want other ways to install it, check the documentation here.
dart pub global activate fvm
If you encounter an error, most likely you have not installed Flutter properly or in a specific way, you haven’t set its environment path properly. You may check how to set it’s environment path here.
Flutter Version Manager Usage
I am just going to demonstrate how to downgrade the flutter version specifically for this blog. You may check the official documentation here if you want to know how to use it completely. Now to demonstrate, I want my Dart version to be specifically version 2.17.0. Thus, I need to know which Flutter version it uses for that specific Dart version. Hence, according to this documentation, I must first use the beta channel and install Flutter version 2.11.0-0.1.pre. Now follow the commands below on how I am going to downgrade my Flutter version.
fvm install beta
fvm install 2.11.0-0.1.pre
Additionally if we want to use that specific version on our project specifically use the command below after you opened your Flutter project.
fvm use 2.11.0-0.1.pre
Conclusion
To conclude, The Flutter Version Manager is a tool that allows you to upgrade, choose, and install specific versions of Flutter. Today you’ve learned how to utilize such tools. Thank you for reading. If you found this useful, please share it with your friends, family, or co-workers.