netglade / auto_mappr

Code generation for mapping between different objects with ease.
https://pub.dev/packages/auto_mappr
MIT License
71 stars 7 forks source link

Enum set to null for unknown values #205

Closed Windisch94 closed 6 months ago

Windisch94 commented 6 months ago

Is it possible for enum mapping that we can set the target to null for not existing enum values in the target branch. I tried with whenSourceIsNull: null but it wont let me do this.

Example: enum MySourceEnum { A, B, C } enum MyTargetEnum { A, B } What i like to do is to set target to null if C (or any other enum value) is present in source.

petrnymsa commented 6 months ago

Hi @Windisch94, have you closed this issue on purpose?