0PricingLogin
Dart Academy · Lesson

Documenting With dartdoc Comments

Write docs that render on pub.dev.

Docs Are Part of the Product

Great packages ship great docs. Dart turns special comments into a browsable reference, so documentation is a first-class feature, not an afterthought. 📝

Triple-Slash Doc Comments

A documentation comment starts with three slashes. These doc comments sit right above a declaration and describe what it does for your users.

/// Adds two numbers and returns the sum.
int add(int a, int b) => a + b;

All lessons in this course

  1. Structuring a Publishable Library
  2. Documenting With dartdoc Comments
  3. Linting, Formatting, and pana Score
  4. dart pub publish to pub.dev
← Back to Dart Academy