removeExact method

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

Removes the entry with key only if its value equals value. Returns true if removed.

Implementation

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