Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributeextension_type_unions

Untagged union types using Dart extension types.

pub.devRemove
result_type

A Result type representing success or failure in Dart

pub.devRemove
ScoresHealth4550 (best)
Maintenance11
Quality100 (best)96
Popularity4647 (best)
Community641 (best)
Compatibility100100
UsageDownloads (30 days)13k (best)5.1k
Likes1635 (best)
Pub points160 / 160 (best)150 / 160
GitHub stars17 (best)12
MaintenanceLatest release1.0.10, 3 years ago1.0.0, 3 years ago (best)
Major versions in 12 months00
Contributors11
PublisherUnverifiedminikin.me
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationNoNo
Direct dependencies0 (best)1
LicenseBSD-3-CLAUSEMIT
Setup effortLowLow
JudgementStrengths
  • Zero runtime overhead because it leverages Dart extension types.
  • Provides static type checks for handling union cases via split methods.
  • Includes a bounded variant for improved run-time type safety.
  • Type-safe success/failure representation
  • Easy chaining with map/flatMap
  • Convenient unwrapOr and unwrapOrElse helpers
Weaknesses
  • Lacks traditional algebraic properties and implicit constructors.
  • Extension types can have their encapsulation violated via manual type casts.
  • No built-in async/await integration beyond Result type
  • Limited to single value, not collections or streams
WarningsNoneNone
extension_type_unions vs result_type: which Flutter package should you use? | pubscout