1 先安装Xcode和Android Studio
2 设置环境变量
vi ~/.zshrc
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
3 下载Flutter SDK
https://docs.flutter.dev/development/tools/sdk/releases
解压缩到指定目录比如
/Users/用户/program/flutter
4 修改环境变量
vi ~/.zshrc
export FLUTTER_HOME=/Users/用户/program/flutter
export PATH=${PATH}:${FLUTTER_HOME}/bin
source ~/.zshrc
5 执行flutter doctor
flutter doctor
Running "flutter pub get" in flutter_tools... 10.8s
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable,