安装和环境配置、创建Flutter项目
Flutter 下载
方式1
方式2
https://flutter.cn/docs/get-started/install/macos/desktop?tab=download
Flutter 环境配置
配置国内镜像站点
bash
# 将 PUB_HOSTED_URL 设置为镜像站点
$ export PUB_HOSTED_URL="https://pub.flutter-io.cn"
# 将 FLUTTER_STORAGE_BASE_URL 设置为镜像站点
$ export FLUTTER_STORAGE_BASE_URL="https://storage.flutter-io.cn"
解压 Flutter
bash
$ unzip flutter_macos_v3.13.0-stable.zip
将 flutter
添加到系统环境变量中
bash
$ export PATH="$PWD/flutter/bin:$PATH"
运行 flutter doctor
来验证安装
bash
$ flutter doctor