Using Flutter in China

The Flutter community has made a Mandarin version of the website available at

If you’d like to install Flutter using an installation bundle, you can replace the domain of the original URL with a trusted mirror to speed it up. For example:

You still need to set up two environment variables to upgrade Flutter and use the pub package repository in China. Please follow the instructions below.

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:

git clone -b dev
export PATH="$PWD/flutter/bin:$PATH"
cd ./flutter
flutter doctor

After these steps, you should be able to continue setting up Flutter normally. From here on, packages fetched by flutter packages get are downloaded from in any shell where PUB_HOSTED_URL and FLUTTER_STORAGE_BASE_URL are set.

The server is a provisional mirror for Flutter dependencies and packages maintained by GDG China. The Flutter team cannot guarantee long-term availability of this service. You’re free to use other mirrors if they become available. If you’re interested in setting up your own mirror in China, please contact for assistance.

Known issue:

  • Running the Flutter Gallery app from source requires assets hosted on a domain this workaround currently doesn’t support. You can subscribe to Issue #13763 to receive updates. In the meantime, you can check out Flutter Gallery from Google Play or third-party app stores you trust.

Other community-run mirror sites:

Please use these community mirror sites only if you trust the provider. The Flutter team cannot verify their reliability nor security.