remove method

V? remove(
  1. K key
)

Removes the value for the given key from the map.

Implementation

V? remove(K key) {
  if (_isPrimitive(key)) {
    return _primitives.remove(key);
  } else {
    final V? result = _objects[key!]  as V?;
    _objects[key] = null;
    return result;
  }
}