rejectKeys<K, V> method

Map<K, V> rejectKeys<K, V>(
  1. Iterable<K> keys
)

Filter where the key is not in the given keys. Returns a new map with filtered entries.

Implementation

Map<K, V> rejectKeys<K, V>(Iterable<K> keys) {
  final map = <K, V>{};
  for (final key in keys) {
    if (!containsKey(key)) {
      map[key] = this[key] as V;
    }
  }
  return map;
}