美文网首页Flutter随笔
Flutter插件开发

Flutter插件开发

作者: 嘛尼嘛哄 | 来源:发表于2019-11-09 12:21 被阅读0次

基本介绍:

Flutter包的官方地址: https://pub.dartlang.org/
Flutter包的国内镜像地址: https://pub.flutter-io.cn
Flutter创建基本步骤,官方教程传送门: https://flutterchina.club/developing-packages/

发布插件关键步骤

  1. check plugin contents
    flutter packages pub publish --dry-run --server={your pub server}
  2. remove local flutter proxy in /.bash_profile
    export PUB_HOSTED_URL=https://pub.flutter-io.cn
    export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
  3. connected VPN
    lantern/ShadowsocksX ....
  4. set terminal proxy
    export http_proxy & https_proxy
  5. check domains:
    curl www.google.com
  6. publish packages
    flutter packages pub publish --dry-run --server={your pub server}

注意事项

  1. 中国地区的朋友发布时需要将PUB_HOSTED_URLFLUTTER_STORAGE_BASE_URL注释掉
  2. 需提前设置好终端的代理,确保ping www.google.com或者curl www.google.com成功
  3. 发布终端代理时指定发布的服务器为官方服务器[https://pub.dartlang.org], 这一步很关键,如果不指定默认就是https://pub.flutter-io.cn,肯定是推不上去的。

相关文章

网友评论

    本文标题:Flutter插件开发

    本文链接:https://www.haomeiwen.com/subject/cbngbctx.html