FVM Quick Reference
Essential Commands
| Command | Description | Example |
|---|---|---|
fvm use [version] | Set project SDK version | fvm use 3.19.0 |
fvm install [version] | Download SDK version | fvm install stable |
fvm list | Show installed versions | fvm list |
fvm global [version] | Set system default | fvm global 3.19.0 |
fvm flutter [cmd] | Run Flutter commands | fvm flutter doctor |
fvm dart [cmd] | Run Dart commands | fvm dart pub get |
Version Formats
| Format | Example | Description |
|---|---|---|
| Release | 3.19.0 | Specific version number |
| Channel | stable | Latest from channel |
| Commit | fa345b1 | Git commit hash |
| Fork | myco/stable | Custom repository |
Common Options
| Option | Commands | Purpose |
|---|---|---|
--force | use, global | Skip validation |
--pin | use | Pin channel version |
--flavor | use | Set flavor version |
--setup | install | Run Flutter setup (default: ON) |
--no-setup | install, use | Skip setup for faster caching |
--skip-pub-get | use, install | Skip dependencies |
Workflows
New Project Setup
cd myproject
fvm use 3.19.0Switch Versions
fvm use 3.16.0 --forceTest Multiple Versions
fvm spawn 3.19.0 test
fvm spawn 3.16.0 testCustom Fork
fvm fork add myco https://github.com/myco/flutter.git
fvm use myco/stableFile Structure
myproject/
├── .fvm/
│ ├── flutter_sdk → ../../../.fvm/versions/3.19.0
│ └── fvm_config.json
├── .fvmrc
└── .gitignore (updated)Environment Variables
FVM_CACHE_PATH- Custom cache directoryFVM_GIT_CACHE_PATH- Git cache locationFVM_FLUTTER_URL- Custom Flutter repo
Tips
- Use
fvm doctorto troubleshoot issues - Add
.fvm/flutter_sdkto.gitignore - Commit
.fvmrcfor team consistency - Use
--no-setupfor faster caching - Enable git cache for faster installs