Bootstrap

国内flutter环境部署(记录篇)

设置系统环境变量

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

使用以下命令下载flutter镜像

git clone -b stable https://mirror.ghproxy.com/https://github.com/<github仓库地址>

#例如flutter仓库
git clone -b stable https://mirror.ghproxy.com/https://github.com/flutter/flutter.git

添加PATH到环境

其中/path/to/your为你的flutter安装根目录

export PATH="$PATH:/path/to/your/flutter/bin"

运行flutter doctor检测是否安装完成

flutter doctor
;