JsonAdapter<T> constructor
const
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
const JsonAdapter({required this.fromJson, required this.toJson})
: super(const StringAdapter());