filterNot method
Returns a new map containing all key-value pairs not matching the given predicate
.
The returned map preserves the entry iteration order of the original map.
Implementation
Map<K, V> filterNot(bool Function(MapEntry<K, V> entry) predicate) {
final result = <K, V>{};
for (final entry in entries) {
if (!predicate(entry)) {
result[entry.key] = entry.value;
}
}
return result;
}