- 安装独立的
dart
环境
官方安装方法:https://dart.dev/get-dart
brew tap dart-lang/dart
brew install dart
- 更新
dart
版本:
brew upgrade dart
- 重新安装
dart
:
brew reinstall dart
- 查看当前dart版本:
$ dart --version
Dart SDK version: 2.13.1 (stable) (Fri May 21 12:45:36 2021 +0200) on "macos_x64"
- 查看当前安装的dart信息:
$ brew info dart
dart-lang/dart/dart: stable 2.13.1, HEAD
The Dart SDK
https://dart.dev
Conflicts with:
dart-beta (because dart-beta ships the same binaries)
/usr/local/Cellar/dart/2.13.1 (508 files, 477.8MB) *
Built from source on 2021-05-31 at 09:44:27
From: https://github.com/dart-lang/homebrew-dart/blob/HEAD/dart.rb
==> Options
--HEAD
Install HEAD version
==> Caveats
Please note the path to the Dart SDK:
/usr/local/opt/dart/libexec
- 安装
fvm
命令:pub global activate fvm
$ pub global activate fvm
Package fvm is currently active at version 2.0.5.
Resolving dependencies... (3.4s)
The package fvm is already activated at newest available version.
To recompile executables, first run `global decativate fvm`.
Installed executable fvm.
Warning: Pub installs executables into $HOME/.pub-cache/bin, which is not on your path.
You can fix that by adding this to your shell's config file (.bashrc, .bash_profile, etc.):
export PATH="$PATH":"$HOME/.pub-cache