the solution I found was in the Visual Studio Code settings JSON file. You need to remove the existing configuration and add a new one to make it work with FVM.
Remove the following configuration:
json
{
"dart.flutterSdkPath": ".fvm/flutter_sdk",
"search.exclude": {
"**/.fvm": true
},
"files.watcherExclude": {
"**/.fvm": true
}
}
And add the following configuration to make it work with all the versions you have downloaded with FVM:
json
{
"dart.flutterSdkPaths": ["/Users/usr/fvm/versions"]
}
Make sure to replace "/Users/usr/fvm/versions" with the actual path to the "versions" folder where FVM stores the downloaded Flutter versions on your system.
This configuration change will allow Visual Studio Code to recognize and use the Flutter versions managed by FVM.
You can find more information about this configuration on the FVM website at
https://fvm.app/docs/getting_started/configuration/.
I hope this helps!