-
Notifications
You must be signed in to change notification settings - Fork 118
Doc comment directives
Dartdoc supports several directives within Dart doc comments. Each directive is then processed during documentation generation, and new text is inserted in place of the directive. Not all directives are processed package documentation at https://pub.dev/.
Doc comment directives look something like {@DIRECTIVE ARG=VALUE ...}
. Some require a closing directive, such as {@template}
and {@endtemplate}
.
TODO(srawlins): Document
You can inline examples in the file system with the {@example}
directive. You can specify the file path, the region, and the example language, with the following syntax:
{@example PATH [region=NAME] [lang=NAME]}
All example file names must have the extension, .md
, and this extension must not be specified in the example PATH
. PATH
must be specified as a relative path from the root of the project root directory of the project for which docs are being generated. Given dir/file.dart
as PATH
, an example will be extracted from dir/file.dart.md
, relative to the project root directory.
TODO(srawlins): Document region, lang, --example-path-prefix
.
TODO(srawlins): Document
TODO(srawlins): Document
TODO(srawlins): Document
TODO(srawlins): Document
TODO(srawlins): Document