Does Flutter Version Management (FVM) worth?

Thiago Evoá
3 min readJul 19, 2021

--

Hello dev, sometimes you have to work in different Flutter projects and at the same time with different SDK versions, however change between the versions installed in your pc is not a simple process to deal every time. As a solution, the community created a Flutter Version Management tool to help you with this, so let’s take a look and see if it worth.

Installation

Following the FVM installation guide I had some issues but in the end I could install doing like this… First I installed the Dart SDK using the Homebrew, and if you are not using a macOS or Linux, and you are using Windows you can probably use Chocolatey, then I run the command dart pub global activate fvm on the terminal, and then I puted this two lines:

  1. export PATH=”$PATH”:”$HOME/.pub-cache/bin”
  2. export PATH=”/Users/{MY_USER}/fvm/default/bin”

on the .zshcr file in order to use the FVM commands. Then I installed the Flutter version that I wanted with the command fvm install stable and than I put this version as global using the command fvm global stable.

I don’t know if I understood wrong on the installation process or the Homebrew part was having issues, but regarding this first step I think the documentation has a little bit more to improve, however it’s working.

IDE and Project Setup

In this part the only thing I’ve done so far was setting up my vsCode in order to make the Flutter project use the correct SDK version. So in this case I just put a few lines of configuration on the vsCode settings.json. And if you are using the Android Studio they also have a guide setup too.

Later I created a Flutter project and then I run the command fvm use stable on the root, to make my project use this specific version to build.

Here in this link you have some basic commands, and I believe they are useful daily commands that you need to know, so make sure to look these commands to use then properly.

Use case

Let’s put it in a practical case just to show how it’s going to work in your daily bases. So, with all configured you have just make sure that you run the fvm use {flutter_version}. Now to run your project you just have to use the command fvm flutter run and your project will run using the selected Flutter version according the one that you are using in the project, and you don’t have to download every time a different Flutter version to build a project.

Ok, so to wrap up this I want to share my thinks about such tool, I think it’s good for people who are coding in different projects and needs to change the Flutter version frequently, because in this situation the FVM will help to do it easily, but if you are not in this continue using the normal Flutter installation because in this case you don't have to deal with all this configurations. I hope that you understood that you don’t actually need a tool like this to run your project, and instead you have to fit the tools to your needs.

--

--

Thiago Evoá
Thiago Evoá

Written by Thiago Evoá

A simple Flutter dev learning everyday.

No responses yet