Flutter plugin for the asdf version manager. This includes both flutter and dart.
asdf plugin-add flutter https://github.com/eugenejeonme/asdf-flutter.git
If you want to keep Flutter latest stable version, you can install it as an "stable" version.
asdf install flutter stable
After installation, you can run flutter upgrade
.
If you have problems with accessing to google, you can set the FLUTTER_STORAGE_BASE_URL
environment variable to change it but structure must be same with Google. Default value is https://storage.googleapis.com
.
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)"
or with OH MY ZSH
ASDF="$HOME/.asdf/bin/asdf"
export FLUTTER_ROOT="$($ASDF where flutter)"
Because this plugin uses jq you have to enable Rosetta to be able to execute non arm optimized software.
Apple will prompt you to install Rosetta if you open a GUI application but not if you're using the terminal. Thus you have to enable Rosetta manually:
softwareupdate --install-rosetta