When working on multiple Flutter projects, version conflicts can become a nightmare. One app needs Flutter 3.7, while another still runs on 2.10. Upgrading one might break another. That’s where FVM (Flutter Version Management) saves the day. In this guide, you’ll learn how to install, configure, and use FVM to streamline your Flutter workflow like a pro.Effortlessly Manage Multiple Flutter SDK Versions
Avoid version conflicts, save hours of debugging, and streamline your Flutter workflow using Flutter Version Management (FVM) — a must-have tool for every Flutter developer.
Why You Need FVM
Imagine this:
You have Flutter 3.9.2 installed globally, but your project needs Flutter 3.24.4. You run the app and get:
- Deprecation errors
- Build failures
- Compatibility issues
Before FVM, you’d:
- Uninstall Flutter manually
- Install another version
- Break other working projects
After FVM:
fvm use 3.24.4
No system changes, no conflicts.
What is FVM?
FVM = Flutter Version Management
A command-line tool that lets you:
- Install and manage multiple Flutter versions
- Set project-specific Flutter SDKs
- Avoid global version conflicts
- Run flutter commands using the right version
Like nvm for Node.js or pyenv for Python — but made for Flutter!
Installing FVM
Using the Install Script (Recommended)
Install latest version:
curl -fsSL https://fvm.app/install.sh | bash
Install specific version (e.g. 3.2.1):
curl -fsSL https://fvm.app/install.sh | bash -s 3.2.1
Using Homebrew (macOS)
brew tap leoafarias/fvm brew install fvm
- Supported Platforms
- macOS
- Linux
- Windows
Requirements
- macOS/Linux: curl, tar, sudo or doas
- Windows: PowerShell or Chocolatey
PATH Setup (If Needed)
FVM usually auto-configures your system. If not:
Add to your shell config:
export PATH="$HOME/.fvm_flutter/bin:$PATH"
Then reload terminal:
source ~/.zshrc # or .bashrc, etc.
Project Configuration with FVM
Use a Specific Flutter Version
fvm use 3.24.4
Creates .fvmrc with:
{
"flutter": "3.24.4",
"updateVscodeSettings": true,
"updateGitIgnore": true,
"runPubGetOnSdkChanges": true
}
Also creates a .fvm/ folder with the SDK and metadata.
Add .fvm/ to .gitignore unless you want to track SDK files.
Common FVM Workflows
1. Set up New Project
cd my_project
fvm use 3.19.0
2. Switch Versions
fvm list
fvm use 3.16.0
fvm use 3.16.0 --force
3. Test with Specific Version
fvm flutter test
fvm spawn 3.24.4 test
4. Different Versions for Flavors
fvm use 3.19.0 --flavor development
fvm use 3.16.0 --flavor production
fvm flavor development build apk
5. CI/CD Integration
dart pub global activate fvm
fvm install
fvm flutter build apk --release
Benefits of FVM
- No need to reinstall Flutter again and again
- Pin exact versions per project
- Avoid global conflicts
- Perfect for teams and CI setups
- Smooth integration with VS Code and Android Studio
Why Use FVM in Flutter Development?
- Avoid global Flutter version conflicts
- Collaborate easily with teams using different versions
- Lock projects to specific Flutter versions
- Manage beta, stable, and dev channels side-by-side