Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributeenum_flag

Portable enum bit flags for Dart with typed FlagSet values and stable bit positions.

pub.devRemove
extension_type_unions

Untagged union types using Dart extension types.

pub.devRemove
ScoresHealth60 (best)45
Maintenance67 (best)1
Quality94100 (best)
Popularity2046 (best)
Community11 (best)6
Compatibility100100
UsageDownloads (30 days)1.4k13k (best)
Likes1016 (best)
Pub points160 / 160160 / 160
GitHub stars1317 (best)
MaintenanceLatest release3.0.0, 3 months ago (best)1.0.10, 3 years ago
Major versions in 12 months20 (best)
Contributors2 (best)1
PublisherUnverifiedUnverified
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationNoNo
Direct dependencies10 (best)
LicenseMITBSD-3-CLAUSE
Setup effortLowLow
JudgementStrengths
  • Stable explicit bit positions for persisted data and APIs.
  • Immutable and typed FlagSet API alongside classic int extensions.
  • Preserves and reports unknown bits for forward compatibility.
  • Guaranteed identical unsigned 32-bit behavior across Dart VM and JavaScript.
  • 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.
Weaknesses
  • Limited to a maximum of 32 bits (positions 0 through 31).
  • Requires manual migration or explicit configuration if flag orders change.
  • Lacks traditional algebraic properties and implicit constructors.
  • Extension types can have their encapsulation violated via manual type casts.
WarningsNoneNone
enum_flag vs extension_type_unions: which Flutter package should you use? | pubscout