remove method

V? remove(
  1. K key
)

Removes and returns the value associated with key, if any. Cancels the pending finalization for that association.

Implementation

V? remove(K key) {
  final box = _expando[key];
  if (box != null) {
    // Manual removal: prevent the finalizer from firing later.
    _finalizer.detach(box);
    _expando[key] = null;
    return box.value;
  }
  return null;
}