encodeMapOrNull<K, V> method
void
encodeMapOrNull<K, V>(})
override
Encodes a nullable map of K
and V
for the given key or id.
Optionally takes Encodable functions to encode each key and value.
Implementation
@override
void encodeMapOrNull<K, V>(String key, Map<K, V>? value,
{int? id, Encodable<K>? keyUsing, Encodable<V>? valueUsing}) {
if (value == null) {
encodeNull(key, id: id);
} else {
encodeMap(key, value, id: id, keyUsing: keyUsing, valueUsing: valueUsing);
}
}