fvm
Manage Flutter SDK versions
TLDR
Install a version of the Flutter SDK. Use without version for project settings
Set a specific version of Flutter SDK in a project
Set a global version of the Flutter SDK
Delete the FVM cache
Remove a specific version of the Flutter SDK
List all installed versions of the Flutter SDK
List all releases of the Flutter SDK
SYNOPSIS
fvm <command> [<options>]
fvm [<global-options>] <command> [<command-options>]
PARAMETERS
--help
Displays help information for FVM or a specific subcommand.
-v, --verbose
Enables verbose output, showing more details about FVM's operations.
--version
Prints the current version of FVM.
--global
Used with subcommands like 'use' to apply the action globally, affecting all projects.
--force
Forces an action, such as overwriting existing files or proceeding despite warnings.
--skip-setup
Used with 'install' to skip the initial Flutter SDK setup process after download.
--config [path]
Specifies a custom FVM config file path (default: .fvm/fvm_config.json).
DESCRIPTION
The fvm command, short for Flutter Version Manager, is a powerful tool designed for developers working with the Flutter SDK. It enables the installation, management, and switching between multiple Flutter SDK versions on a single machine. This capability is crucial for projects requiring specific Flutter versions, ensuring consistency and preventing conflicts. FVM simplifies the process of testing applications against different SDK releases, managing global or project-specific SDK paths, and handling stable, beta, dev, or master channels. It abstracts away the complexity of manual SDK downloads and path configurations, making development workflows smoother and more reliable.
CAVEATS
fvm is not a standard Linux command that comes pre-installed with most distributions. It is a third-party tool primarily used by Flutter developers to manage Flutter SDK versions. Its functionality is specific to Flutter development environments and requires Flutter SDK to be installed or managed by FVM itself. It must be installed separately, typically via Dart's global pub activation or by downloading from its repository. Environment variables (like PATH) might need to be configured correctly for fvm and the Flutter SDKs it manages to be accessible.
COMMON SUBCOMMANDS
fvm operates primarily through subcommands, each performing a specific task:
- fvm install <version>: Downloads and installs a specified Flutter SDK version (e.g., '3.0.0' or 'stable').
- fvm use <version>: Sets the specified Flutter SDK version for the current project, or globally if '--global' is used.
- fvm list: Displays all Flutter SDK versions currently installed by FVM.
- fvm remove <version>: Deletes a specific Flutter SDK version from the FVM managed directory.
- fvm releases: Lists all available Flutter SDK release versions for installation.
- fvm doctor: Checks the FVM setup and reports any issues.
- fvm exec <command>: Executes a Flutter-related command using the FVM-managed Flutter SDK for the current project or global setup.
INSTALLATION
fvm is typically installed via the Dart Pub package manager:dart pub global activate fvm
Alternatively, it can be installed directly from its GitHub repository for specific versions or development branches.
HISTORY
The fvm (Flutter Version Manager) project emerged from the growing need within the Flutter development community to manage multiple Flutter SDK versions seamlessly. As Flutter applications became more complex and projects often relied on different SDK releases (e.g., stable for production, beta for testing new features), manual switching and environment variable management became cumbersome. FVM was created to automate this process, allowing developers to switch SDK versions per project or globally with simple commands. It gained significant traction as a vital tool for ensuring project consistency and simplifying developer workflows, evolving rapidly to support new Flutter features and installation methods.