omit method

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

New map without the listed keys. user.omit(["password"])

Implementation

Map<K, V> omit(Iterable<K> keys) {
  final Set<K> drop = keys.toSet();
  return <K, V>{
    for (final MapEntry<K, V> e in entries)
      if (!drop.contains(e.key)) e.key: e.value,
  };
}