Skip to content
pubscout

daco

0.5.2+1, released 11 days ago by gabriel.terwesten.net

A tool for maintaining Dart documentation comments and formatting embedded code examples.

WASM-ready
$ flutter pub add daco
Source repository

What it does

Daco formats documentation comments as Markdown using prettier and formats/analyzes embedded Dart code examples. It provides both an analyzer plugin for syntax errors and a `daco analyze` command for full semantic analysis.

AI-written summary of version 0.5.2+1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to automatically format and wrap documentation comments and markdown tables
  • You want syntax and semantic checking for Dart code examples inside doc comments
  • You use prettier for Markdown formatting in your Dart project workflow

Skip it when

  • You do not use Markdown for documentation comments
  • You cannot install NodeJS on your path (required for prettier)

Strengths

  • Supports recursive formatting of doc comments and embedded Dart code
  • Integrates with the Dart analyzer plugin to catch syntax errors in examples
  • Performs full semantic analysis via `daco analyze`

Weaknesses

  • Requires a recent version of NodeJS (>=14) installed on the path
  • Potential changes to dartdoc tag locations when formatting preexisting codebases

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
14

Requires NodeJS (>=14) installed on the path. Add daco as a dev dependency, enable the analyzer plugin in analysis_options.yaml, and optionally install globally via pub global activate.

/// Greets the user.
///
/// ```dart main
/// greet(name: 'Alice');
/// ```
void greet({required String name}) {}

Works with

Packages commonly used together with daco: ones it builds on, ones built on it, and its own family.