Common Workflows
Quick guides for typical FVM tasks. Each workflow shows the essential commands to accomplish specific goals.
Setting up a new project
Configure a Flutter project to use a specific SDK version.
# Navigate to project
cd myproject
# Set Flutter version
fvm use 3.19.0
# Or use latest stable
fvm use stable --pinResult: Creates .fvm directory and .fvmrc configuration file.
Switching between versions
Change SDK versions for different projects or testing.
# Check current version
fvm list
# Switch to different version
fvm use 3.16.0
# Force switch without validation
fvm use 3.16.0 --forceWorking with multiple flavors
Manage different SDK versions for development, staging, and production.
# Set development version
fvm use 3.19.0 --flavor development
# Set production version
fvm use 3.16.0 --flavor production
# Use flavor-specific version
fvm flavor development build apkTesting with different versions
Run tests across multiple Flutter SDK versions.
# Test with current project version
fvm flutter test
# Test with specific version
fvm spawn 3.19.0 test
# Test with another version
fvm spawn 3.16.0 testCI/CD integration
Set up FVM in continuous integration pipelines.
# Install FVM
dart pub global activate fvm
# Install project SDK version
fvm install
# Run Flutter commands
fvm flutter build apk --releaseManaging custom forks
Use company or personal Flutter forks.
# Add fork
fvm fork add company https://github.com/company/flutter.git
# Install from fork
fvm install company/stable
# Use fork version
fvm use company/3.19.0Global version setup
Configure a system-wide default Flutter version.
# Set global version
fvm global 3.19.0
# Add to PATH (one-time setup)
export PATH="$HOME/fvm/default/bin:$PATH"
# Use global version
flutter doctorCleaning up old versions
Review unused SDKs and cached patch upgrades, then remove what you do not need.
# Preview unused SDKs and patch upgrade commands
fvm cleanup
# Remove unused SDKs FVM knows about
fvm cleanup --remove-unused
# Remove a specific version
fvm remove 3.16.0
# Remove all versions
fvm remove --allMonorepo setup
Configure FVM for projects with multiple Flutter apps.
# Root configuration
cd monorepo
fvm use 3.19.0
# App-specific versions
cd apps/mobile
fvm use 3.16.0
# Package uses root version
cd packages/shared
# Inherits from rootOffline installation
Install Flutter SDK from local cache or network share.
# Configure custom cache path
fvm config --cache-path /shared/flutter-cache
# Disable git cache for offline use
fvm config --no-use-git-cache
# Install from local cache
fvm install 3.19.0Troubleshooting
Common solutions for FVM issues.
# Check environment
fvm doctor
# Verify project setup
cd myproject
fvm doctor
# Force reinstall
fvm remove 3.19.0
fvm install 3.19.0
# Reset global config
fvm global --unlinkIDE configuration
VS Code
FVM automatically configures VS Code settings. To manually configure:
- Run
fvm use <version>in project - Restart VS Code or reload window
- Verify SDK path in settings
Android Studio / IntelliJ
FVM does not change Android Studio or IntelliJ settings automatically. Configure the IDE with the project link at .fvm/flutter_sdk or the global link at <FVM cache>/default.
JetBrains IDEs can resolve either link to its current cached version, so verify and reselect the SDK after switching versions. See the Android Studio and IntelliJ guide for the complete setup and troubleshooting steps.
Best practices
Version selection
- Use specific versions for production apps
- Pin channels for active development
- Document version requirements in README
Team collaboration
# Add to .gitignore
.fvm/
# Commit this file
.fvmrcPerformance tips
- Enable git cache for faster installs
- Use
fvm install --no-setupwhen you only need to cache SDKs (run--setuplater viafvm use) - Run
fvm installin CI before build steps