Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributesum_types

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

pub.devRemove
tonik

Pure Dart OpenAPI 3.0/3.1 code generator for type-safe API client packages.

pub.devRemove
ScoresHealth4473 (best)
Maintenance388 (best)
Quality76100 (best)
Popularity47 (best)27
Community2358 (best)
Compatibility100 (best)85
UsageDownloads (30 days)76k (best)4.5k
Likes14 (best)9
Pub points140 / 160160 / 160 (best)
GitHub stars40 (best)13
MaintenanceLatest release0.4.0, 2 years ago0.11.1, 4 weeks ago (best)
Major versions in 12 months00
Contributors44
PublisherUnverifiedottenweller.net
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesNo
KindPure DartPure Dart
Code generationNoNo
Direct dependencies1 (best)9
LicenseMITMIT
Setup effortMediumLow
JudgementStrengths
  • Generates boiler‑plate‑free sum‑type classes.
  • Supports const constructors, generic and recursive types.
  • Provides exhaustive `iswitch` pattern matching.
  • Generates distinct types for every status code and content type combination.
  • Pure Dart implementation with no JVM or Docker requirement.
  • Supports all OpenAPI parameter encoding styles and advanced composition features like oneOf and allOf.
Weaknesses
  • 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.
  • Requires code regeneration whenever the OpenAPI specification changes.
WarningsNoneNone
sum_types vs tonik: which Flutter package should you use? | pubscout