whereNotNull method

Map<K, V> whereNotNull()

Returns Map without null keys and values.

Implementation

Map<K, V> whereNotNull() {
  final map = <K, V>{};
  forEach((key, value) {
    if (key != null && value != null) {
      map[key] = value;
    }
  });
  return map;
}