-
Notifications
You must be signed in to change notification settings - Fork 76
Closed
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
Could you please add an option that enums are generated with unkown value? This enables enums to be more safe for future additions.
json_serializable does unfortunately not support null values for unkown cases, but you can define a fallback value like unkown.
The configuration in json_serializable for this looks like this:
@JsonEnum()
enum MenuItemType {
...
@JsonValue('unkown')
unkown;
}
@JsonKey(
name: 'type',
unknownEnumValue: MenuItemType.unkown,
)
final MenuItemType type;
StarProximaCarapacik
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested