Failed to execute the flutter Packages GET after waiting more than 3 minutes

$ flutter packages get
Running "flutter pub get" in flutter_app...
Got socket error trying to find package fluwx at https://pub.dartlang.org.
Running "flutter pub get" in flutter_app...
pub get failed (69) -- attempting retry 1 in 1 second...
Running "flutter pub get" influtter_app... 196.8 s (!)Copy the code

I found the reason on the Internet and found that it hit the wall. The environment variable configured before was incorrect. Execute the following two lines as instructed by the official documentation

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

Note: This image is temporary and is not guaranteed to be available all the time. Please refer to Using Flutter in China to get the latest information about the image server.

Execute flutter Packages get, 7.8s! done

$ flutter packages get
Running "flutter pub get" influtter_app... 7.8 sCopy the code