JsonAdapter<T> constructor
JsonAdapter<T> ({})
Creates a new JSON adapter with the specified conversion functions.
fromJson
converts a JSON map to the target type T
.
toJson
converts an instance of T
to a JSON map.
Implementation
JsonAdapter({required this.fromJson, required this.toJson});