google / google/webcrypto.dart
Move dartdoc examples to separate files
- Dominant language
- Dart
- Stars
- 116
- Forks
- 110
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 9
Description
As of recent `dartdoc` versions it's now possible to do:
```dart
/// My documentation string...
///
/// {@example /path/to/example/file.dart}
void someMethod() { ... }
```
Doing this makes it easy to run `dart analyze` on examples and use `dart format` on examples.
I propose that we refactor the current repository layout such that we have:
```dart
example/
flutter_webcrypto_demo/
... everything that's currently in example/
webcrypto/
hmac/
import_raw_key.dart
...
/
.dart
```
And then we use `/// {@example /example/webcrypto/hmac/import_raw_key.dart}` in our API docs.
This should not land as one large PR, please do:
* [x] One PR moving `example/` to `example/flutter_webcrypto_demo/`
* One commit that moves files
* One commit that fixes CI
* Any further cleanup of names, do that in an other PR
* [ ] A PR for each primitive, so we don't have too big PRs to review
Contributor guide
Assessment
This issue has not been assessed yet.