gpt4 book ai didi

flutter - 在 dart 中创建一个包

转载 作者:行者123 更新时间:2023-12-02 03:43:37 24 4
gpt4 key购买 nike

如何在新的 Dart 编辑器中创建包?
没有“添加 Pub 支持”复选框?
另外如何使用新编辑器创建“包”?
是否有介绍新编辑器过程的教程?

最佳答案

来自 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.

关于flutter - 在 dart 中创建一个包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18568459/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com