smartRemove method

V? smartRemove(
  1. K key
)

Removes the key-value pair with the given key from the map, with behavior determined by ChangeType.

  • key: The key of the element to remove.
  • Returns: The value associated with the key, or null if the key was not present.

Implementation

V? smartRemove(K key) {
  final removedValue = value.remove(key);
  if (removedValue != null) {
    notify();
  }
  return removedValue;
}