dart: mac 环境安装/升级/卸载

如何在 macos 下安装 dart

01 切换源

brew tap dart-lang/dart

02 安装

brew install dart

03 检测

brew info dart

04 hello world

void main() {
  print('Hello, World!');
}

05 如何升级

brew upgrade dart

06 配置 idea

找到 sdk path,并且下载 dart 插件

brew info dart
/usr/local/opt/dart/libexec
sdk path 在这里
配置到 webstorm
配置 代码提示

07 卸载

# 1. Uninstall the Dart SDK.
$ brew uninstall dart

# 2. Remove the Dart configuration files from your home directory.
rm -rf  ~/.dart*
dart mac installation webstorm idea