当前位置:   article > 正文

pub.flutter.org 国内镜像站_pub 中国站点

pub 中国站点

直接可访问的站点:https://pub.flutter-io.cn

windows设备 系统属性->高级->环境变量:添加下面中的某一对

mac设备

Using Flutter in China

The Flutter community has made a Simplified Chinese version of the Flutter website available athttps://flutter.cn.

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 must also set two environment variables to upgrade Flutter and use the pub package repository in China. Instructions are below.

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 fluttercommand.

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:

content_copy

$ export PUB_HOSTED_URL=https://pub.flutter-io.cn
$ export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
$ git clone -b dev https://github.com/flutter/flutter.git
$ export PATH="$PWD/flutter/bin:$PATH"
$ cd ./flutter
$ flutter doctor
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

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

The flutter-io.cn 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, contact flutter-dev@googlegroups.com for assistance.

Flutter社区的镜像站
FLUTTER_STORAGE_BASE_URL = https://storage.flutter-io.cn
PUB_HOSTED_URL = https://pub.flutter-io.cn 


上海交通大学 Linux 用户组的镜像站(与原站实时更新)
PUB_HOSTED_URL=https://dart-pub.mirrors.sjtug.sjtu.edu.cn
FLUTTER_STORAGE_BASE_URL=https://mirrors.sjtug.sjtu.edu.cn


清华大学 TUNA 协会的镜像站(与Flutter社区同步)
PUB_HOSTED_URL=https://mirrors.tuna.tsinghua.edu.cn/dart-pub
FLUTTER_STORAGE_BASE_URL=https://mirrors.tuna.tsinghua.edu.cn/flutter


CNNIC的镜像站 (与TUNA同步)
PUB_HOSTED_URL=http://mirrors.cnnic.cn/dart-pub
FLUTTER_STORAGE_BASE_URL=http://mirrors.cnnic.cn/flutter


腾讯开源的镜像站(与TUNA同步)
PUB_HOSTED_URL=https://mirrors.cloud.tencent.com/dart-pub
FLUTTER_STORAGE_BASE_URL=https://mirrors.cloud.tencent.com/flutter
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23

flutter 官网
https://flutter.dev

flutter克隆地址
git clone https://github.com/flutter/flutter.git -b stable

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/276054?site
推荐阅读
相关标签
  

闽ICP备14008679号