Flutter plugin for the asdf version manager.
bash
,curl
,tar
: generic POSIX utilities.jq
: recommended.xz
: only required for Linux.
Plugin:
asdf plugin add flutter https://github.com/nyuyuyu/asdf-flutter.git
flutter:
# Show all installable versions
asdf list-all flutter
# Install specific version
asdf install flutter latest
# Set a version globally (on your ~/.tool-versions file)
asdf global flutter latest
# Now flutter commands are available
flutter --help
Check asdf readme for more instructions on how to install & manage versions.
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.
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)"
Contributions of any kind welcome! See the contributing guide.