MacOS中配置Flutter相关全局环境变量
1、修改 $HOME/.zshrc文件
vim $HOME/.zshrc
2、添加以下内容
# Flutter路径
export PATH="$PATH:[Flutter路径]/flutter/bin"
# 国内镜像
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
# 代理
export HTTP_PROXY=http://127.0.0.1:1080
export HTTPS_PROXY=http://127.0.0.1:1080
3、刷新
source $HOME/.zshrc
4、检查Flutter信息
flutter doctor