dartdoc

The dartdoc command creates API reference documentationfrom Dart source code.You can add descriptions to the generated documentationby using documentation comments,which can contain markdown formatting.For guidance on writing doc comments,see the documentation part of Effective Dart.

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

  1. $ cd my_app
  2. $ dartdoc
  3. Documenting my_app...
  4. ...
  5. 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.To view the rendered documentation, you need an HTTP server.

Although dartdoc is in the Dart SDK,it’s also available in the dartdoc package.You might use the package when you need a programmatic interfaceor when you want to try features thataren’t yet in the SDK’s version of dartdoc.

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

  1. $ dartdoc --help