Skip to content

Flutter plugin for the asdf version manager

License

Notifications You must be signed in to change notification settings

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 for Linux.

Install

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.

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