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
validators2

String validation and sanitization for Dart.

pub.devRemove
ScoresHealth4582 (best)
Maintenance187 (best)
Quality100 (best)96
Popularity4650 (best)
Community680 (best)
Compatibility100100
UsageDownloads (30 days)13k78k (best)
Likes16 (best)9
Pub points160 / 160 (best)150 / 160
GitHub stars17 (best)0
MaintenanceLatest release1.0.10, 3 years ago5.1.1, 3 weeks ago (best)
Major versions in 12 months00
Contributors19 (best)
PublisherUnverifiedonepub.dev
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationNoNo
Direct dependencies00
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.
  • No external dependencies, pure Dart.
  • Up-to-date regexes and edge‑case handling (e.g., email backtracking fix).
  • Supports Dart 3.x and null safety.
Weaknesses
  • Lacks traditional algebraic properties and implicit constructors.
  • Extension types can have their encapsulation violated via manual type casts.
  • Limited to string validation; no UI components.
  • No built‑in error message localization.
  • Not a form builder, just helper functions.
WarningsNoneNone
extension_type_unions vs validators2: which Flutter package should you use? | pubscout