remove method

V? remove(
  1. Object? key
)

Remove key

Implementation

V? remove(Object? key) {
  final newMap = Map<K, V>.from(value);
  final hadKey = newMap.containsKey(key);
  final removed = newMap.remove(key);
  if (hadKey) value = newMap;
  return removed;
}