encodeIterableOrNull<E> method

  1. @override
void encodeIterableOrNull<E>(
  1. String key,
  2. Iterable<E>? value, {
  3. int? id,
  4. Encodable<E>? using,
})
override

Encodes a nullable iterable of E for the given key or id.

Optionally takes an Encodable function to encode each element.

Implementation

@override
void encodeIterableOrNull<E>(String key, Iterable<E>? value, {int? id, Encodable<E>? using}) {
  if (value == null) {
    encodeNull(key, id: id);
  } else {
    encodeIterable(key, value, id: id, using: using);
  }
}