removeNullValues method

Map<K, V> removeNullValues()

Removes all null values from the map

Implementation

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