fromJson property
A Function to use when decoding the associated JSON value to the annotated field.
Must be a top-level or static Function or a constructor that accepts one positional argument mapping a JSON literal to a value compatible with the type of the annotated field.
When creating a class that supports both toJson
and fromJson
(the default), you should also set toJson
if you set fromJson
.
Values returned by toJson
should "round-trip" through fromJson
.
Implementation
final Function? fromJson;