Skip to content
pubscout

dart_apitool

0.23.2, released 4 months ago by bmwtech.dev

Analyze and diff public APIs of Dart packages to check semantic versioning.

$ flutter pub add dart_apitool
Source repository

What it does

Dart API Tool analyzes the public API of a package, creates a model of it, and compares it against another version. It helps maintainers verify that version numbers follow semantic versioning correctly by detecting breaking changes.

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

Use it when

  • You want to automate semver checking in your package CI pipeline.
  • You need to compare public APIs between different package versions, git branches, or local directories.

Skip it when

  • You need a general-purpose linter or formatter for source code.
  • You want to analyze implementation details or internal logic rather than public APIs.

Strengths

  • Supports local paths, pub.dev packages, and Git repositories with specific tags or branches.
  • Integrates smoothly into CI workflows to catch accidental breaking changes early.

Weaknesses

  • It cannot cover all potential API changes or look into internal implementations.
  • Relies heavily on the accuracy of the analyzer and public exports.

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
18

Install globally via dart pub global activate dart_apitool.

dart-apitool diff --old pub://my_package/1.0.0 --new .

Works with

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