fvm 0.6.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 53

fvm #

Coverage MIT Licence Awesome Flutter

Flutter Version Management: A simple cli to manage Flutter SDK versions.


  • Configure Flutter SDK version per project
  • Ability to install and cache multiple Flutter SDK Versions
  • Easily switch between Flutter channels & versions
  • Per project Flutter SDK upgrade

Version Management #

This tool allows you to manage multiple channels and releases, and caches these versions locally, so you don't have to wait for a full setup every time you want to switch versions.

Also, it allows you to grab versions by a specific release, i.e. 1.2.0. In case you have projects in different Flutter SDK versions and do not want to upgrade.

Usage #

To Install:

> pub global activate fvm

And then, for information on each command:

> fvm help

Install a SDK Version #

FVM gives you the ability to install many Flutter releases or channels.

> fvm install <version>

Version - use master to install the Master channel and 1.8.0 to install the release.

Use a SDK Version #

You can use different Flutter SDK versions per project. To do that you have to go into the root of the project and:

> fvm use <version>

Remove a SDK Version #

Using the remove command will uninstall the SDK version locally. This will impact any projects that depend on that version of the SDK.

> fvm remove <version>

List Installed Versions #

List all the versions that are installed on your machine.

> fvm list

Change FVM Cache Directory #

There are some configurations that allows for added flexibility on FVM.

fvm config --cache-path <path-to-use>

List Config Options #

Returns list of all stored options in the config file.

fvm config --ls

Running Flutter SDK #

There are a couple of ways you can interact with the SDK setup in your project.

Proxy Commands #

Flutter command within fvm proxies all calls to the CLI just changing the SDK to be the local one.

> fvm flutter run

This will run flutter run command using the local project SDK. If no FVM config is found in the project. FMV will recursively try for a version in a parent directory.

Call Local SDK Directly #

FVM creates a symbolic link within your project called fvm which links to the installed version of the SDK.

> ./fvm run

This will run flutter run command using the local project SDK.

As an example calling fvm flutter run is the equivalent of calling flutter run using the local project SDK.

Configure Your IDE #

VSCode #

Add the following to your settings.json

"dart.flutterSdkPaths": [

Add your IDE instructions here

License #

This project is licensed under the MIT License - see the LICENSE file for details

Contributors ✨ #

Thanks goes to these wonderful people (emoji key):

Leo Farias
Leo Farias

📖 🤔 💻 💡 👀 🚧 🚇
Ianko Leite
Ianko Leite


💻 🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

0.6.6 #

  • Better Flutter command compatibility
  • Improved error logging and --verbose behavior
  • Friendlier error messages

0.6.5 #

  • Better Error handling and friendlier error message

0.6.4 #

  • Project clean-up and tweaks for better pub analysis.

0.6.3 #

  • Initial stable version rewritten in Dart.


Example #

The following is a step by step if you want to run an specific version of Flutter within a project.

First choose the version you would like to install and cache on your machine.

This will install version 1.8.0 and cache locally.

> fvm install 1.8.0

Go into the project directory

> cd path/to/project

Set the project to use the version that you have installed.

> fvm use 1.8.0

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate fvm

2. Use it

The package has the following executables:

$ fvm

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  fvm: ^0.6.6

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:fvm/fvm.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.13.1+4

Health suggestions

Fix lib/fvm.dart. (-1 points)

Analysis of lib/fvm.dart reported 2 hints:

line 2 col 8: Unused import: 'package:args/command_runner.dart'.

line 11 col 8: Unused import: 'package:cli_util/cli_logging.dart'.

Format lib/commands/flutter.dart.

Run dartfmt to format lib/commands/flutter.dart.

Maintenance suggestions

The package description is too short. (-4 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
args ^1.5.2 1.5.2
cli_util ^0.1.3+2 0.1.3+2
console ^3.1.0 3.1.0
io ^0.3.3 0.3.3
path ^1.6.4 1.6.4
Transitive dependencies
charcode 1.1.2
meta 1.1.8
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
vector_math 2.0.8
Dev dependencies
pedantic ^1.8.0
test ^1.6.0
test_coverage ^0.3.0