2

给定一个组织如下的飞镖包

/example
|_______/foo
|________________/pubspec.yaml (and stuff)
|________________/main.dart
|_______/baz
|________________/pubspec.yaml (and stuff)
|________________/main.dart
/lib
|_______/foo
|________________/foo.dart
|_______/baz
|________________/baz.dart
/test
|_______/foo
|________________/foo_test.dart
|_______/baz
|________________/baz_test.dart

但是 pub.dev 给了我

0/10 points: Package has an example
> No example found.
See package layout guidelines on how to add an example.

但我没有发现文档对我的案例很有帮助

这让我想到了标题中的问题:

How to correctly organize multiple examples on a dart package?

4

1 回答 1

2

您可以在示例文件夹中添加一个 README.md 文件,作为 flutter_mobx 包。

看:https ://pub.dev/packages/flutter_mobx/example

于 2021-02-04T13:47:41.840 回答