encodeMapOrNull<K, V> method

  1. @override
void encodeMapOrNull<K, V>(
  1. Map<K, V>? value, {
  2. Encodable<K>? keyUsing,
  3. Encodable<V>? valueUsing,
})
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 = null;
    return;
  }
  _encodeMap(value, keyUsing, valueUsing);
}