Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributedart_mappable

JSON serialization and data classes generator supporting generics, inheritance, and customization.

pub.devRemove
json_annotation

Provides annotations for json_serializable to generate JSON (de)serialization code.

pub.devRemove
ScoresHealth89 (best)84
Maintenance85 (best)70
Quality100 (best)81
Popularity8397 (best)
Community8080
Compatibility100100
UsageDownloads (30 days)513k16M (best)
Likes4701.3k (best)
Pub points160 / 160 (best)150 / 160
GitHub stars2421.6k (best)
MaintenanceLatest release4.10.0, 2 months ago (best)4.12.0, 6 months ago
Major versions in 12 months00
Contributors1951 (best)
Publisherschultek.devgoogle.dev
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationYesNo
Direct dependencies31 (best)
LicenseMITBSD-3-CLAUSE
Setup effortLowLow
JudgementStrengths
  • Full support for generics, polymorphism, and inheritance.
  • All-in-one package generating serialization, equality, toString, and copyWith.
  • Highly flexible with mapping hooks and custom configuration options.
  • Small, zero‑runtime‑overhead package.
  • Works with Dart 3 and newer SDKs.
  • Provides fine‑grained control via JsonKey options.
Weaknesses
  • Requires running build_runner for code generation.
  • toJson() returns a String rather than a Map<String, dynamic>, which requires attention when migrating from other packages.
  • Requires a separate code‑gen step with build_runner and json_serializable.
  • Only useful when paired with a generator; on its own it does nothing.
WarningsNoneNone
dart_mappable vs json_annotation: which Flutter package should you use? | pubscout