decodeObject<T> method

  1. @override
T decodeObject<T>(
  1. String key, {
  2. int? id,
  3. Decodable<T>? using,
})
override

Decodes the data for the given key or id as an object of type T.

This forwards the decoding to the provided Decodable implementation. Otherwise tries to decode the data to a supported primitive type T.

Implementation

@override
T decodeObject<T>(String key, {int? id, Decodable<T>? using}) {
  var d = decoders[key] ?? decoders[id];
  return d!.clone().decodeObject(using: using);
}