I added fvm to my project and set it up like this. Now I can run all the commands for example fvm use x.x.x
or fvm flutter pub get
. Everything works.
BUT when running the application through VSCode directly (Play button or shortcut) it always uses my latest install SDK version. Why is it not starting with the current flutter version ?
This is my settings.json
:
{
"dart.flutterSdkPaths": [
"/Users/usr/fvm/versions"
],
// Remove .fvm files from search
"search.exclude": {
"**/.fvm": true
},
// Remove from file watching
"files.watcherExclude": {
"**/.fvm": true
}
}
What am I missing here? How do I configure fvm to work correctly with VSCode?
I'm assuming you have the
.fvm
folder set up properly? ie. It contains the symlinkflutter_sdk
(which points to the currently selected SDK) and thefvm_config.json
.In your
settings.json
file, you also need to set the location of the SDK itself:Which will point to the same symlink.