[英]How to create a package with support for both flutter and dart at the same time
I want to build a package for Flutter and Dart, but I don't have any previous experience with package development.我想为 Flutter 和 Dart 构建一个 package,但我以前没有任何 package 开发经验。 I am not sure how to create the package. Should I use我不确定如何创建 package。我应该使用
flutter create --template=package
or或者
dart create -t package
I want support for both Flutter and Dart.我想要同时支持 Flutter 和 Dart。
I looked at the Flutter documentation on creating packages, but I couldn't understand if it would create a package with Flutter only support, or both Flutter and Dart support.我查看了关于创建包的 Flutter 文档,但我不明白它是否会创建一个仅支持 Flutter 的 package,或者同时支持 Flutter 和 Dart 的支持。
First, use the following command to check if your package meets all the requirements to publish the package.首先,使用以下命令检查您的 package 是否满足发布 package 的所有要求。
dart pub publish --dry-run
Once you are sure that your package is ready to deploy on pub dev run this command:一旦确定您的 package 已准备好在 pub dev 上部署,请运行此命令:
dart pub publish
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.