required property Null safety
Declares annotated field as required for serialization / deserialization process
i.e needs to be present explicitly in incoming JSON payload object
Optional custom message requiredMessage could be provided as well
If set to
true states of ignore, ignoreForDeserialization,
ignoreForSerialization, ignoreIfNull, Json.ignoreNullMembers has no meaning.
final bool? required;