[Flutter] Use asdf flutter plugin to install multiple Flutter versions
asdf and Flutter Plugin
asdf
is a single CLI tool for managing multiple runtime versions. It extend with a simple plugin system to install your favourite language: Dart, Elixir, Flutter, Golang (Go), Java, Node.js, Python, Ruby …
This article is about how to use asdf
and Flutter plugin to install multiple Flutter versions on macOS with the Homebrew package manager.
Prerequisites
-
Xcode Command Line Tools
The Xcode Command Line Tools Package is a small self-contained package available for download separately from Xcode and that allows you to do command line development in macOS which is consists of the macOS SDK and command-line tools such as Clang, which are installed at thisFor more information about installing and using Xcode Command Line Tools, see the Xcode Command Line Tools
-
Homebrew
Homebrew is the Missing Package Manager for macOS (or Linux).For more information about installing and using Homebrew, see the Homebrew - https://brew.sh/.
Installation
Install asdf
1 | Install asdf dependencies |
asdf Flutter Plugin
1 | Install Flutter plugin requirements |
List all Flutter Version
Update Flutter plugin.
1 | asdf plugin update flutter |
List all Flutter versions.
1 | asdf list all flutter |
Install Flutter version
Install a Flutter version manually.
1 | asdf install flutter 2.0.0-stable |
Or install another version.
1 | asdf install flutter 1.22.6-stable |
References
[1] Manage asdf - https://asdf-vm.com/#/core-manage-asdf
[2] oae/asdf-flutter: Flutter plugin for the asdf version manager - https://github.com/oae/asdf-flutter