Search packages, repositories and app categories

Package detailsv4.10.0

dart_mappable

Improved json serialization and data classes with full support for generics, inheritance, customization and more.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
516K
Likes
469
Pub points
160

Install package

flutter pub add dart_mappable

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

dart_mappable is a code generation package for Dart that simplifies JSON serialization and data class creation. It provides robust support for generics, inheritance, and custom serialization logic, enabling developers to write clean, type-safe models with minimal boilerplate. The package generates efficient serialization code at compile time, improving performance and reducing runtime errors. It integrates seamlessly with Flutter apps across all platforms, including Android, iOS, Web, macOS, Windows, and Linux. With customizable field mappings and flexible configuration options, dart_mappable enhances developer productivity while maintaining strong type safety.

Use cases

  • JSON parsing in Flutter apps
  • Creating reusable data models
  • Handling complex nested structures
  • Supporting inheritance in data classes
  • Customizing JSON field names
  • Generating code for API responses

Key features

  • Full generics support
  • Inheritance-aware serialization
  • Customizable field mapping
  • Compile-time code generation
  • Minimal boilerplate
  • Extensible configuration

Suitable for

  • Flutter developers needing efficient JSON handling
  • Teams prioritizing type safety
  • Projects with complex data models
  • Apps requiring high-performance serialization
  • Developers using code generation workflows
  • Projects targeting multiple platforms

Considerations

  • Requires build_runner for code generation
  • Needs understanding of annotation-based setup
  • May increase build time slightly
  • Limited runtime customization
  • Dependent on correct annotation usage
  • Best used with static analysis tools

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

packages/dart_mappable/README.md

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

Rankings