Documentation is a critical part of software development, and to encourage good documentation of packages, Dart has the tool dartdoc
(https://github.com/dart-lang/dartdoc/), which creates static HTML documentation based on specially formatted code comments. Previous documentation tools for Dart were part of the SDK, while dartdoc
is a separate project developed by the Dart team.
It can be installed using pub
at the command line:
pub global activate dartdoc
We will take a look at a Dart package project to explore the features of dartdoc
. Open the project quakerecord
in the WebStorm Editor, and take a look at the file quakerecord.dart
:
library quakerecord; export 'src/quakerecord_base.dart';
This package exports a single file, quakerecord_base.dart,
and in this file, the class Processor
is declared:
/// A lightweight object to process a raw earthquake feature. /// /// * Must have valid JSON. /// * Must be less than 128MB. /// class Processor { // Store for the...