nonNulls property

Map<K, V> get nonNulls

Returns a new map with all non-null keys and values.

Implementation

Map<K, V> get nonNulls {
  return Map<K, V>.fromEntries(
    entries
        .where((e) => e.key != null && e.value != null)
        .map((e) => MapEntry(e.key as K, e.value as V)),
  );
}