0

I am working on two projects. one has flutter version of 2.10.1 and another has version 2.10.5. it is very irritating and difficult for me to download each time the version. I have already activated fvm but I am not able to manage the "fvm absolute path" in flutter sdk path. how can I have the .fvm/flutter_sdk directory in my running project to get "fvm absolute path"?

3 Answers3

0

You just need to run fvm install <VERSION> in your project, by example : fvm install 2.10.1

You can check the version by using fvm flutter --version

All informations are in FVM documentation.

Jouby
  • 2,196
  • 2
  • 21
  • 33
0

make sure you have fvm setup already, to add it to an existing project use command **fvm use version **

0

For Android Studio

  1. install flutter versions
$ fvm install 2.10.1
$ fvm install 2.10.5

You can list the versions which had been installed with command below:

$ fvm list             
Cache Directory:  /Users/xxx/fvm/versions

2.10.1
2.10.5
  1. use fvm to change new version with command below:
$ cd project
$ fvm use 2.10.5 -f
  1. change the Flutter SDK path in Android Studio Perferences.

You can select the version from Perferences. Search Flutter settings. You must have install Flutter plugin, so change the setting Flutter SDK path to your version like this: xxx/project/.fvm/flutter_sdk

your project have the folder .fvm after execute the command fvm use 2.10.5 -f before. specify the sdk path to your project .fvm/flutter_sdk absolute path

for more details to view offical website fvm.

For vscode

install the version you need and switch to the version

For exists project

$ cd project
$ fvm use 2.10.5 -f

the command fvm use 2.10.5 -f will create or update .fvm/flutter_sdk and .fvm/flutter_config.json. the .fvm/flutter_sdk sybolink is the version 2.10.5 your changed.

add the file to your project root .vscode/settings.json

{
  "dart.flutterSdkPath": ".fvm/flutter_sdk",
  // Remove .fvm files from searche
  "search.exclude": {
    "**/.fvm": true
  },
  // Remove from file watching
  "files.watcherExclude": {
    "**/.fvm": true
  }
}

You can view this https://stackoverflow.com/a/76270797/8624456 for more details or official website fvm.

wxit
  • 5
  • 3