Important:
  Use mirror sites only if you trust the provider.
  The Flutter team cannot verify their reliability or security.

Configuring Flutter to use a mirror site

If you’re installing or using Flutter in China, it may be helpful to use
a trustworthy local mirror site that hosts Flutter’s dependencies.
To instruct the Flutter tool to use an alternate storage location,
you need to set two environment variables, PUB_HOSTED_URL and
FLUTTER_STORAGE_BASE_URL, before running the flutter command.

Taking macOS or Linux as an example, here are the first few steps in
the setup process for using a mirror site. Run the following in a Bash
shell from the directory where you wish to store your local Flutter clone:

export

PUB_HOSTED_URL

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

export

FLUTTER_STORAGE_BASE_URL