encodeMapOrNull<K, V> method
void
encodeMapOrNull<K, V>(})
override
Encodes a nullable map of K
and V
.
Optionally takes Encodable functions to encode each key and value.
Implementation
@override
void encodeMapOrNull<K, V>(Map<K, V>? value, {Encodable<K>? keyUsing, Encodable<V>? valueUsing}) {
if (value == null) {
_value.add(null);
return;
}
_value.add(_encodeMap(value, keyUsing, valueUsing));
}