mapContainsValue<K, V> static method

bool mapContainsValue<K, V>(
  1. Map<K, List<V>> map,
  2. K key,
  3. V value
)

Checks if a map of lists contains a specific value.

Implementation

static bool mapContainsValue<K, V>(Map<K, List<V>> map, K key, V value) {
  if (value == null) return false;
  return map[key]?.contains(value) ?? false;
}