dart学习: 开发自己的包
开发自己的 dart 包
创建包
因为 dart 没有命名空间(scope) 这种概念,而且官方不打算有这个功能,所以,只能用
jsw_
这种方式来进行了。
dart create -t package jsw_calculator
生成文档
![](https://tva1.js.work/large/da432263gy1hixglerf9uj211o06swfp.jpg)
dart doc .
发布
![](https://tva1.js.work/large/da432263gy1hixgn9pb63j20x30u0n0p.jpg)
$ p dart pub publish --server=https://pub.dartlang.org
因为 dart 没有命名空间(scope) 这种概念,而且官方不打算有这个功能,所以,只能用
jsw_
这种方式来进行了。
dart create -t package jsw_calculator
dart doc .
$ p dart pub publish --server=https://pub.dartlang.org