removeExact method

bool removeExact({
  1. required Object key,
  2. required Object value,
})

Returns true if the map contains the specified key and value and removes the entry, false otherwise.

Implementation

bool removeExact({required Object key, required Object value}) {
  if (containsKey(key) && this[key] == value) {
    remove(key);
    return true;
  }
  return false;
}