withoutNullValues method

Map<K, V> withoutNullValues()

Returns a copy without null values.

Implementation

Map<K, V> withoutNullValues() {
  return Map<K, V>.fromEntries(
    entries.where((entry) => entry.value != null),
  );
}