I am having a problem when running dart pub add <package_name>
. Just upgraded to latest flutter version 3.16 and created a new project but couldn't install any packages. I tried previous projects but same error. Tried running terminal as administrator but no luck. can someone verify this is global issue or a way to fix this?
EDIT
the error message:
Got socket error trying to find package firebase_messaging_platform_interface at https://pub.dev.
exit code 69
On Windows you need to add the following to your system environment variables :
name: PUB_HOSTED_URL
value: https://pub.flutter-io.cn
name: FLUTTER_STORAGE_BASE_URL
value: https://storage.flutter-io.cn