adeptgenerator 15.0.0
adeptgenerator: ^15.0.0 copied to clipboard
This generator creates a function that returns a new instance of the annotated ClassType by creating a copy of the currentData and replacing its fields with the newData
15.0.0 #
Added #
- Fields contributed by a mixin are now generated as fields of the annotated class by the clone, copyWith, diff and isEmpty generators.
Changed #
- Field types are now resolved against the annotated class, so type arguments of generic superclasses and mixins are substituted instead of emitting the raw type parameter.
copyWithnow assigns mixin fields with a cascade after the constructor call and skips final mixin fields.
Fixed #
- A field declared more than once across the hierarchy is now generated only once, honoring the most derived declaration and its
@CloneKey,@CopyWithKey,@DiffKeyor@IsEmptyKeyannotation. - Private fields declared in another library are no longer generated.
13.0.0 #
Changed #
- Updated dependencies analyzer to use
build: ^4.0.0,source_gen: ^4.0.1andanalyzer: ^8.1.1
12.0.0 #
Changed #
- Updated dependencies analyzer to use
build: ^3.0.0,source_gen: ^3.0.0andadeptannotations: ^7.0.0
10.0.1+1 #
Fixed #
- Synthetic fields without getter or setter are ignored when generating copyWith code.
8.0.0+1 #
Changed #
- Update dependency constraints to
sdk: '>=3.0.0 <4.0.0' flutter: '>=3.3.0' - Update dependencies to be compatible with Flutter 3.10.0
2.1.0+11 #
Added #
- @CloneKey added
cloneFunctionto be used for specific cloning on a field. - @CloneKey added
considerEmptyCollectionAsNullto ignore data from collections if it's empty as it were null. - @DiffKey added
diffFunctionto be used for specific diff on a field.
2.0.1+10 #
Added #
- Support for @CloneKey
defaultValueto be used if the currentData or newData isnull. - Support for @DiffKey
defaultValueto be used if currentData and newData are equal.
1.3.0+6 #
Added #
- New generator for @Differentiable() and @DiffKey annotations from adeptannotations package.
- New property forceCurrentData on @CloneKey() annotation
1.2.0+3 #
- Generator updated to work with ignoreSynthetic from Cloneable annotation
- Static, const and final fields excluded from cloning
- Validations added to ensure synthetics fields are properly defined to be used in cloning
1.1.0+2 #
- CloneKey ignore flag is taken into account to ignore fields while cloning
1.0.0+1 #
- Readme updated
1.0.0 #
- First release