As described in our Principles FVM does not override standard Flutter behavior. Therefore to upgrade a channel you will have to use standard
flutter upgrade. You can find more about it in the Running Flutter section.
Suppose you have a nested package(s) that you want to share the same Flutter version. You can set up the FVM config at the root of the monorepo.
FVM will do an ancestor look-up to find the config and use it as the default.
pub global activate fvm, pub will grab the latest FVM version that is compatible with the installed dart-sdk. Upgrade to the latest version of the Dart, and run the command again. Go to https://dart.dev/get-dart (opens in a new tab) for more information.
fvm list this will output the directory used for Flutter cache. Delete that directory.
If you installed using pub run
dart pub global deactivate fvm, if you used a standalone installation please follow its instructions.
This happens due to a pub issue https://github.com/dart-lang/pub/issues/2934 (opens in a new tab). To avoid this issue from happening make sure you PATH is in the following order. Please read the following.
There are a few reasons this can happen. However it means that the FVM snapshot is not compatible with the Dart version that is installed.
Please do the following:
- On Windows make sure your env variables are in the following order as described here.
dart pub global deactivate fvm
dart pub global activate fvm
If you get
Command 'pub' not found, then make sure to append
export PATH="$PATH:/usr/lib/dart/bin" to your
~/.bashrc (gets reiniated each time you open a bash shell) or
~/.profile (only read at login) file.
Flutter comes with Dart embedded. Because of that you can find some conflicts when running standalone Dart and Flutter together. Here is a suggestion of what we found to be the correct order of dependencies to avoid issues.
- Pub Cache for global packages
- Dart SDK (if installed outside of Flutter)
- Flutter SDK
It should look like this.