fvm 0.6.1

fvm #

Coverage MIT Licence Awesome Flutter

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

Features:

  • 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; however, it 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

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.

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": [
    "fvm"
]

Add your IDE instructions here

Contributing #

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

License #

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

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:


dependencies:
  fvm: ^0.6.1

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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
40
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

Primary library: package:fvm/fvm.dart with components: io.

Health suggestions

Fix lib/commands/install.dart. (-0.50 points)

Analysis of lib/commands/install.dart reported 1 hint:

line 2 col 8: Unused import: 'package:fvm/constants.dart'.

Fix lib/commands/list.dart. (-0.50 points)

Analysis of lib/commands/list.dart reported 1 hint:

line 19 col 9: Use isEmpty instead of length

Fix lib/commands/use.dart. (-0.50 points)

Analysis of lib/commands/use.dart reported 1 hint:

line 1 col 8: Unused import: 'dart:io'.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The package description is too short. (-20 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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and fvm.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

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.7
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