dartz_plus_generator 0.1.0
dartz_plus_generator: ^0.1.0 copied to clipboard
Code generator for dartz_plus AutoMapper.
Changelog #
All notable changes to this project will be documented in this file.
0.1.0 - 2025-12-15 #
Added #
- Initial release of
dartz_plus_generator @Mapperannotation for automatic mapping code generationMapperGeneratorclass that generates bidirectional mapping extensions- Support for generating
to{TargetName}()extension methods - Bidirectional mapping support (can be disabled with
reverse: false) - Smart field resolution that handles:
- Optional parameters
- Nullable parameters
- Required parameter validation
- Inheritance support - collects fields from superclasses
- Comprehensive error messages for:
- Invalid annotation targets
- Missing constructors
- Missing required fields
build.yamlconfiguration for automatic code generation- Full integration with
build_runner
Features #
- Automatic Mapper Generation: Annotate DTOs with
@Mapper(TargetEntity)to generate mapping extensions - Type Safety: Compile-time validation ensures all required fields are mapped
- Flexibility: Control reverse mapping generation with
reverseparameter - Smart Resolution: Automatically handles optional and nullable fields
Dependencies #
analyzer: ^9.0.0build: ^4.0.3collection: ^1.19.1dartz_plus: path dependencysource_gen: ^4.1.1
Dev Dependencies #
build_runner: ^2.10.4lints: ^6.0.0source_gen_test: ^1.3.3test: ^1.26.3
Requirements #
- Dart SDK: ^3.10.4