Dart's pub tool is blocked by GFW. So we have to use it with the help of a proxy.
Modify pubspec.yaml at the root of a Dart project. Then run the following commands at this position:
export http_proxy=http://<username>:<password>@us.jayproxy.net:6000
export https_proxy=http://<username>:<password>@us.jayproxy.net:6000
pub get