As of recent dartdoc versions it's now possible to do:
/// 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:
example/
flutter_webcrypto_demo/
... everything that's currently in example/
webcrypto/
hmac/
import_raw_key.dart
...
<class>/
<identifier>.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:
As of recent
dartdocversions it's now possible to do:Doing this makes it easy to run
dart analyzeon examples and usedart formaton examples.I propose that we refactor the current repository layout such that we have:
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:
example/toexample/flutter_webcrypto_demo/