【flutter】fvm版本管理

官网 https://fvm.app

安装

brew tap leoafarias/fvm
brew install fvm

卸载

brew uninstall fvm
brew untap leoafarias/fvm

Different Flutter Repo#

You can use a different Flutter repo, a fork or as a local cache, by setting the FVM_GIT_CACHE environment variable.

List config#

fvm config

Set cache path#

Location where Flutter SDK versions will be stored. If nothing is set, the default will be used.

fvm config --cache-path <CACHE_PATH>

Use#

Sets Flutter SDK Version you would like to use in a project. If version does not exist it will ask if you want to install.

Usage:

fvm use {version}

Option:

-h, --help Print this usage information.
-f, --force Skips Flutter project checks.
-p, --pin Pins latest release channel instead of channel itself.
--flavor Sets version for a project flavor

If you are starting a new project and plan on using fvm flutter create you wil have to use the --force flag

Install#

Installs Flutter SDK Version. Gives you the ability to install Flutter releases or channels.

Usage:

fvm install - # Installs version found in project config
fvm install {version} - # Installs specific version

Option:

-h, --help Print this usage information.
-s, --skip-setup Skips Flutter setup after install

Remove#

Removes Flutter SDK Version. Will impact any projects that depend on that version of the SDK.

Usage:

fvm remove {version}

Option:

-h, --help Print this usage information.
--force Skips version global check.

List#

Lists installed Flutter SDK Versions. Will also print the cache directory used by FVM.

Usage:

fvm list

Option:

-h, --help Print this usage information.

Releases#

View all Flutter SDK releases available for install.

Usage:

fvm releases

Option:

-h,
--help Print this usage information.

Doctor#

Shows information about environment, and project configuration.

Usage:

fvm doctor

Option:

-h, --help Print this usage information.

参考文章:https://juejin.cn/post/7109797407109414920

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容