fvm 4.0.0-beta.1 copy "fvm: ^4.0.0-beta.1" to clipboard
fvm: ^4.0.0-beta.1 copied to clipboard

A simple cli to manage Flutter SDK versions per project. Support channels, releases, and local cache for fast switching between versions.

fvm #

GitHub stars Pub Version Pub Likes Pub Points All Contributors MIT License Codecov Awesome Flutter

FVM streamlines Flutter version management. It allows per project SDK versions, ensuring consistent app builds and easier testing of new releases, thereby boosting the efficiency of your Flutter project tasks.

Why FVM? #

  • Need for simultaneous use of multiple Flutter SDKs.
  • SDK testing requires constant channel switching.
  • Channel switches are slow and need repeated reinstalls.
  • Difficulty managing the latest successful SDK version used in an app.
  • Flutter's major updates demand total app migration.
  • Inconsistencies occur in development environments within teams.

For more information, read FVM documentation.

Contributors #


Checkout Flutter Sidekick. Read more about it here.

Troubleshooting #

Please view our FAQ.

License #

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

FVM Version Format Testing Guide #

This directory contains a testing environment for validating the Flutter Version Manager (FVM) version format handling. The tests focus on ensuring that all valid version formats are correctly parsed and applied, while invalid formats are properly rejected.

Test Script Overview #

The run_tests.sh script automates the testing of various version formats with FVM. It:

  1. Creates a clean Flutter test environment
  2. Tests different version formats including:
    • Channel versions (stable, beta, dev, master)
    • Semantic versions (e.g., 2.10.0)
    • Versions with 'v' prefix (e.g., v2.10.0)
    • Versions with channel specification (e.g., 2.10.0@beta)
    • Fork specifications (e.g., custom-fork/stable)
  3. Validates error handling for invalid formats
  4. Reports test results

Running the Tests #

To run the tests with standard output:

./run_tests.sh

For detailed debugging output:

./run_tests.sh --verbose

Tested Version Formats #

The script tests the following version formats:

Format Example Description
Channel stable, beta Flutter release channels
Semantic Version 2.10.0 Specific Flutter version
V-prefixed Version v2.10.0 Version with 'v' prefix
Version with Channel 2.10.0@beta Specific version from a channel
V-prefixed with Channel v2.10.0@beta V-prefixed version from a channel
Fork with Channel custom-fork/stable Fork with specified channel

Error Cases #

The script also validates proper rejection of invalid formats:

  • Invalid channel specification (2.10.0@invalid)
  • Custom build with channel (custom_build@beta)
  • Non-existent fork (unknown-fork/stable)

Test Results #

After running the tests, review the output to ensure all tests passed. If any failures occur, the script will provide details about what went wrong.

For a complete record of test outcomes, refer to the TEST_RESULTS.md file which may be generated after running the tests.

Prerequisites #

  • Dart SDK must be installed and available in PATH
  • Flutter SDK must be installed and available in PATH
  • The script should be run from the test/fixtures/sample_app directory

Troubleshooting #

If some tests are skipped, it may be because:

  1. The required Flutter versions are not installed
  2. The list command in the FVM implementation has issues

In these cases, the script will continue with available tests and provide warnings about what was skipped.

678
likes
120
points
58.1k
downloads

Publisher

verified publisherleoafarias.com

Weekly Downloads

A simple cli to manage Flutter SDK versions per project. Support channels, releases, and local cache for fast switching between versions.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

args, cli_completion, dart_console, dart_mappable, date_format, git, interact, io, jsonc, mason_logger, meta, path, pub_semver, pub_updater, pubspec_parse, scope, stack_trace, tint, win32, yaml, yaml_edit, yaml_writer

More

Packages that depend on fvm