如何在新的Dart编辑器中创建包?
没有"Add Pub support“复选框?
另外,如何使用新的编辑器创建“包”?
有没有一个教程描述了使用新编辑器的过程?
发布于 2020-07-15 19:46:06
从Dart/Flutter文档中:
步骤1:创建包要创建Flutter包,请使用带有flutter Create的--template=package标志:
flutter create --template=package hello
这将在hello文件夹中创建一个包含以下内容的包项目:
LICENSE
A (mostly) empty license text file.
test/hello_test.dart
The unit tests for the package.
hello.iml
A configuration file used by the IntelliJ IDEs.
.gitignore
A hidden file that tells Git which files or folders to ignore in a project.
.metadata
A hidden file used by IDEs to track the properties of the Flutter project.
pubspec.yaml
A yaml file containing metadata that specifies the package’s dependencies. Used by the pub tool.
README.md
A starter markdown file that briefly describes the package’s purpose.
lib/hello.dart
A starter app containing Dart code for the package.
.idea/modules.xml, .idea/modules.xml, .idea/workspace.xml**
A hidden folder containing configuration files for the IntelliJ IDEs.
CHANGELOG.md
A (mostly) empty markdown file for tracking version changes to the package.
发布于 2021-02-03 19:27:52
创建一个名为mypackage的包。
对于Dart包:
dart create --template=package-simple mypackage
对于Flutter包:
flutter create --template=package mypackage
发布于 2013-09-02 08:28:41
目前在Dart编辑器中没有这样的可能性。要创建包,请执行以下步骤:
mylib
pubspec.yaml
文件lib
文件夹<代码>H29<代码>H110创建包含要打包的代码的<代码>D11<代码>H212<代码>F213有关更多信息,请参阅Package layout conventions。
https://stackoverflow.com/questions/18568459
复制相似问题