custom_mapper 0.0.9
custom_mapper: ^0.0.9 copied to clipboard
A powerful code generation package for creating type-safe mappers between domain objects and data transfer objects (DTOs) in Dart and Flutter applications.
0.0.8 #
Add Collection support #
- Add collection support: Mapper now support generating extension method for Dart collections like Iterable, Set, List.
0.0.7 #
Enhancements #
- Enhanced domain class resolution: Domain classes can now be imported from other files
- Fixed cross-file mapping: Resolves empty extension generation when domain class is in a separate file
- Improved library search: Enhanced
findClassInLibraryto search through imported libraries
0.0.2 #
Bug Fixes #
- Platform Support: Added explicit platform support declarations for all platforms (Android, iOS, Windows, macOS, Linux, Web)
- Dependencies: Updated dependency constraints to support newer versions:
analyzer: Now supports up to<10.0.0build: Now supports up to<5.0.0source_gen: Now supports up to<5.0.0
0.0.1 #
Initial Release #
Custom Mapper - A build_runner code generator for custom_mapper_annotation package.
π§ What it does
This package generates type-safe mapping code for classes annotated with @Mapper from the custom_mapper_annotation package.
π Features
- Code Generator: Processes
@Mapperannotations to generate mapping methods - Build Runner Integration: Works seamlessly with
build_runnerto generate.map.dartfiles - Type Safety: Generated code is fully type-safe with compile-time checking
- Bidirectional Mapping: Supports both
toDomain()andtoData()method generation - Advanced Types: Handles generics, collections, nested objects, and nullable types
π¦ Usage
- Add
custom_mapper_annotationto dependencies - Add
custom_mapperandbuild_runnerto dev_dependencies - Annotate your classes with
@Mapper - Run
dart run build_runner build
π Related Packages
custom_mapper_annotation- Contains the@Mapperand other annotations used by this generator