最后用国内镜像解决了。方法:
1、计算机->属性->高级系统设置->环境变量,在用户变量下添加下面两个:
PUB_HOSTED_URL https://pub.flutter-io.cn FLUTTER_STORAGE_BASE_URL https://storage.flutter-io.cn2、重启电脑
3、将flutter SDK->bin目录->cache 清空。
4、打开命令行,重新输入 flutter doctor,会自动升级:
PUB_HOSTED_URL https://pub.flutter-io.cn FLUTTER_STORAGE_BASE_URL https://storage.flutter-io.cn2、重启电脑