dart doc

The dart doc command (previously called dartdoc) creates API reference documentation from Dart source code. You can add descriptions to the generated documentation by using documentation comments, which can contain Markdown formatting. For guidance on writing doc comments, see the documentation part of Effective Dart.

Run dart doc from the root directory of your package. For example:

$ cd my_app
$ dart pub get
$ dart doc .
Documenting my_app...
Success! Docs generated into /Users/me/projects/my_app/doc/api

By default, the documentation files are static HTML files, placed in the doc/api directory. You can create the files in a different directory with the --output flag.

For information on command-line options, use the help command:

$ dart help doc