Hey there, If you are a Flutter developer and have been working on multiple projects, you must have faced a very common issue: handling projects that work on different versions of Flutter. And usually what we do is keep each version of Flutter in a folder and link them manually.

But what if I say there is a better solution to it, which is using FVM?

Index – FVM
An expressive way to build design systems in Flutter.

FVM

So FVM, as its name sounds, stands for "Flutter Version Manager". And it's a super easy way to manage multiple Flutter versions on a PC, from installing to using – super easy.

So let's begin without wasting any more time.

Setup

So here, I'll be covering Windows, as the majority of people use Windows, but if you on another system, just use this link –

Installation – FVM
An expressive way to build design systems in Flutter.

To install on Windows, you need to have "Chocolatey Package Manager" already installed.

If it's not installed on your PC, follow this link –

Installing Chocolatey
Chocolatey is software management automation for Windows that wraps installers, executables, zips, and scripts into compiled packages. Chocolatey integrates w/SCCM, Puppet, Chef, etc. Chocolatey is trusted by businesses to manage software deployments.

Once you have installed chocolatey, run this command -

choco install fvm

And thats it, it will get installed in your PC.

Usage

So now you know how you can use it; for it there are just 2 commands you need to use.

Installing new version

fvm install <version>

Using a specific version

fvm use <version>

You need to run this inside your flutter project, it will do all the necessary things.

Android Stuido & VS Code Setup

Usually it will get auto-configured to use the version in FVM, but if not, simply do this.

Also, if you have any confusion about where the versions are stored, simply run this command –

fvm list

It will show all the installed versions as well as the path where all these are stored. Although by default FVM adds the version in the project folder itself using symlinks.

VS Code

Set flutterSdkPath in settings.json

{
  "dart.flutterSdkPath": "<version-path>"
}

Android Studio

In Android Studio got to -

Settings > Languages & Framerworks > Flutter

Here you can see the option to set the Flutter Sdk Path.


So this is all; by following the guide, you can set up FVM on your computer.

If you have any queries, do let me know in the comments.

Share this post