[Dart语法] dart pub get
Resolving dependencies...
pubspec.yaml has no lower-bound SDK constraint.
You should edit pubspec.yaml to contain an SDK constraint:
environment:
sdk: '^2.12.0'
在 pubspec.yaml 文件中添加
environment:
sdk: '^2.12.0'
然后再重新:
dart pub get
如果接着出现下面报错:
Got TLS error trying to find package http at https://pub.dev.
那么修改镜像:
我这里使用的是腾讯镜像:
配置环境变量的方式(win10)
分别新建两个变量:
变量名:
PUB_HOSTED_URL
值:
https://mirrors.cloud.tencent.com/dart-pub
变量名:
FLUTTER_STORAGE_BASE_URL
值:
https://mirrors.cloud.tencent.com/flutter