Flutter version manager
Last modified on Tue 09 Nov 2021

Flutter version manager (FVM) helps us to use several specific version of flutter per project: https://github.com/leoafarias/fvm

There are several benefits of this, here are three:


One person should setup fvm in the project. If it's already set up you can skip to Using FVM.

Setup FVM in project

There are two ways to configure fvm, through CLI or desktop app (desktop app will probably be easier). You can read more at https://github.com/leoafarias/fvm. Setup is done once you have /.fvm/fvm_config.json file.

Only commit that json file, the sdk symlink should not be included. To do that add to gitignore:


Setup FVM on Bitrise

Right after the flutter install use the "Install Flutter Version Manager" step. That step will replace path so all steps use FVM flutter.

Using FVM

After the FVM is setup, all members need to use FVM instead of regular flutter.

Instead of writing flutter pub run build_runner You should write fvm flutter pub run build_runner

Change SDK path from global flutter to current project .../flutter-project-name/.fvm/flutter_sdk.

Now all your run, debug and other tools should use FVM version of flutter.

IMPORTANT: This is per project setting which means that you need to change it for each project in studio for which you want to use FVM.