fromJson property Null safety

Function? fromJson

A Function to use when decoding the associated JSON value to the annotated field.

Must be a top-level or static Function that takes one 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.


final Function? fromJson;