isAllEqualsInMap function

bool isAllEqualsInMap(
  1. Map? map,
  2. Object value, [
  3. bool deep = false
])

Returns true if map values are all equals to value.

deep IF true checks deeply collections values.

Implementation

bool isAllEqualsInMap(Map? map, Object value, [bool deep = false]) {
  if (map == null || map.isEmpty) return false;

  for (var e in map.values) {
    if (!isEquals(e, value, deep)) {
      return false;
    }
  }

  return true;
}