remove method

  1. @useCopy
IMap<K, V> remove(
  1. K key
)

Returns a new map containing the current map minus the given key and its value. However, if the current map doesn't contain the key, it will return the current map (same instance).

Implementation

@useCopy
IMap<K, V> remove(K key) {
  M<K, V> result = _m.remove(key);
  return identical(result, _m) ? this : IMap<K, V>._unsafe(result, config: config);
}