Skip to content

Instantly share code, notes, and snippets.

@frederick-greenacademy
Last active June 29, 2021 08:29
Show Gist options
  • Save frederick-greenacademy/9c4f8bb635e5f3cb690d91634edade86 to your computer and use it in GitHub Desktop.
Save frederick-greenacademy/9c4f8bb635e5f3cb690d91634edade86 to your computer and use it in GitHub Desktop.
`flutter pub get` can not get any dependency plugins

There are some network issue from your network service which is causing the issue. Choose options below:

  1. You can use Hostspot Shield VPN (Free with Limited 2.2 MB)
  2. Set an enviromnent variables

Window - use these commands in cmd to set the variables in your project environment

set PUB_HOSTED_URL=https://pub.flutter-io.cn

set FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

macOS - add below on ~/.bash_profile or ~/.zshrc

export PUB_HOSTED_URL=https://pub.flutter-io.cn

export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment