Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributebuild

Package for authoring build_runner compatible code generators.

pub.devRemove
sum_types

A code generator that adds algebraic sum‑type support to Dart.

pub.devRemove
ScoresHealth87 (best)44
Maintenance90 (best)3
Quality93 (best)76
Popularity85 (best)47
Community80 (best)23
Compatibility85100 (best)
UsageDownloads (30 days)8.1M (best)76k
Likes102 (best)14
Pub points150 / 160 (best)140 / 160
GitHub stars871 (best)40
MaintenanceLatest release5.0.0, 5 weeks ago (best)0.4.0, 2 years ago
Major versions in 12 months10 (best)
Contributors100+ (best)4
Publisherdart.devUnverified
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyNoYes
KindPure DartPure Dart
Code generationYesNo
Direct dependencies61 (best)
LicenseBSD-3-CLAUSEMIT
Setup effortMediumMedium
JudgementStrengths
  • Provides the core underlying Builder interface used across the Dart build ecosystem.
  • Gives easy access to the analyzer for processing and resolving Dart source code.
  • Generates boiler‑plate‑free sum‑type classes.
  • Supports const constructors, generic and recursive types.
  • Provides exhaustive `iswitch` pattern matching.
Weaknesses
  • Low-level compared to source_gen, requiring more manual handling of build steps.
  • Major version updates can introduce breaking changes for packages implementing BuildStep.
  • Requires build_runner and the generator to run.
  • Only works with Dart SDK >=3.0.0.
  • Limited to sum‑type use‑cases; not a general utility library.
WarningsNoneNone
build vs sum_types: which Flutter package should you use? | pubscout