getEntryWithValue method

MapEntry<K, ISet<V>>? getEntryWithValue(
  1. V value
)

Return any key:set entry where the value exists in the set. If that entry doesn't exist, return null.

Implementation

MapEntry<K, ISet<V>>? getEntryWithValue(V value) {
  for (MapEntry<K, ISet<V>> entry in _mapOfSets.entries) {
    var set = entry.value;
    if (set.contains(value)) return entry;
  }
  return null;
}