decodeMapOrNull<K, V> method

  1. @override
Map<K, V>? decodeMapOrNull<K, V>(
  1. String key, {
  2. int? id,
  3. Decodable<K>? keyUsing,
  4. Decodable<V>? valueUsing,
})
override

Decodes the data for the given key or id as a nullable map of key-value pairs.

Optionally takes Decodables to decode the keys and values of the map.

Implementation

@override
Map<K, V>? decodeMapOrNull<K, V>(String key, {int? id, Decodable<K>? keyUsing, Decodable<V>? valueUsing}) {
  if (_value[key] == null) return null;
  return decodeMap(key, id: id, keyUsing: keyUsing, valueUsing: valueUsing);
}