我们自己做了插件包,当然也想发布到pub.dartlang.org上去。怎么发布呢?先看看官方的说明( https://flutter.io/developing-packages/ )。 Publishing packages Once you have implemented a package, you can publish it on Pub , so that other developers can easily use it. Prior to publishing, make sure to review the pubspec.yaml , README.md , and CHANGELOG.md files to make sure their content is complete and correct. Next, run the dry-run command to see if everything passes analysis: $ flutter packages pub publish --dry-run Finally, run the actual publish command: $ flutter packages pub publish For details on publishing, see the Pub