Skip to content

nyuyuyu/asdf-flutter

 
 

Repository files navigation

asdf-flutter Build Lint

Flutter plugin for the asdf version manager.

Contents

Dependencies

  • bash, curl, tar: generic POSIX utilities.
  • jq: recommended.
  • xz: only required on Linux, supported in GNU tar v1.22 and above.

Install

Plugin:

asdf plugin add flutter https://github.com/nyuyuyu/asdf-flutter.git

Flutter:

# Show all installable versions
asdf list all flutter

# Install a specific version
asdf install flutter latest

# Install from a git ref of github.com/flutter/flutter repository(i.e. commit hash, tag and branch)
# You can also specify a git ref for any repository set in the `ASDF_FLUTTER_SOURCE_REPO_URL` environment variable
# See https://github.com/nyuyuyu/asdf-flutter/pull/25 for more details
asdf install flutter ref:master

# Set a default version(on your ~/.tool-versions file)
asdf set --home flutter latest

# Now flutter commands are available
flutter --help

Check asdf readme for more instructions on how to install & manage versions.

Support fvm

If you have set legacy_version_file = yes in $HOME/.asdfrc, you can read the Flutter version from .fvmrc or .fvm/fvm_config.json, the fvm configuration file.

Troubleshooting

VS Code

image

To fix the "Could not find a Flutter SDK" error, you can set the FLUTTER_ROOT environment variable in your .bashrc or .zshrc file:

export FLUTTER_ROOT="$(asdf where flutter)"

Contributing

Contributions of any kind welcome! See the contributing guide.

Thanks goes to these contributors!

License

See LICENSE © nyuyuyu

About

Flutter plugin for the asdf version manager

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Languages

  • Shell 100.0%