Configure FVM and IDEs for better support for different development environments.
FVM will create a relative symlink in your project from
.fvm/flutter_sdk to the cache of the selected version. Add it to your
You can configure the fvm cache directory by setting
FVM_HOME environment variable. If nothing is set the default fvm path will be used. You are also able to change the directory by setting the
--cache-path on the config. See below
There are some configurations which you can change on FVM. All settings set on CLI are compatible with the Sidekick(GUI).
Different Flutter Repo
You can use a different Flutter repo, a fork or as a local cache, by setting the
FVM_GIT_CACHE environment variable.
> fvm config
Set cache path
Location where Flutter SDK versions will be stored. If nothing is set, the default will be used.
> fvm config --cache-path <CACHE_PATH>
You might have to restart your IDE and the Flutter debugger to make sure it uses the latest version of the configurations in some situations.
Option 1 - Automatic Switching (Recommended)
You can add the version symlink for a dynamic switch. VS Code will always use the version selected within the project for all IDE tooling. Also, remove the Flutter SDK from search to make things easier. Just create a folder inside the project called
.vscode and then create a file called
settings.json and add the following file:
// Remove .fvm files from search
// Remove from file watching
fvm use <desired version> in the project root directory; If configured correctly, this will switch the version used on VSCode. If you are having issues, click on the Flutter version text on the status bar of VSCode, to show all the current SDKs installed on your machine. Select auto-detect, which will check
.vscode dir inside your project and then change your Flutter SDK depending on the fvm config or manually select the Flutter SDK from fvm cache directory.
Option 2 - View all SDKs (Manual switching)
VSCode has the ability for you to switch between all cached Flutter SDKs using
Flutter: Change SDK.
fvm list to show you the cache path to the versions.
List all versions installed by FVM
You can see all the versions installed by FVM in VS Code by just providing path to
versions directory. In the following example path for macOS, replace
$USER with your username:
Alternatively, you can specify only selected versions. The following snippet will cause VS Code to show only
dev versions of Flutter.
To change current Flutter version open a project and select
Flutter: Change SDK in the command palette. You should see all the versions as depicted in the following screenshot.
- Go to
Languages & Frameworks > Flutteror search for Flutter and change Flutter SDK path.
- Copy the absolute path of fvm symbolic link in your root project directory. Example:
- Apply the changes.
- Restart Android Studio to see the new settings applied.
For Android Studio to detect the dynamic change of SDKs, the installed SDK must have finished setup.
fvm install <VERSION> will ensure that setup during install.
If you have installed through another command and setup was not completed. You can finish by just running
fvm flutter --version
Android Studio might take a few seconds to detect the dynamic SDK change.
If you want to ignore the Flutter SDK root directory within Android Studio you can add the following to
<path value="$PROJECT_DIR$/.fvm/flutter_sdk" />
If that doesn't work, go to Android Studio -> Preferences -> Editor -> File Types -> Ignored Files and Folders and add