remove method

V? remove(
  1. K key
)

Remove a key.

Implementation

V? remove(K key) {
  final newMap = Map<K, V>.from(val);
  final removed = newMap.remove(key);
  emit(newMap);
  return removed;
}