bool mapEquals()

in serde-generate/runtime/dart/serde/hash_utils.dart [18:28]


bool mapEquals<T, U>(Map<T, U>? a, Map<T, U>? b) {
  if (a == null) return b == null;
  if (b == null || a.length != b.length) return false;
  if (identical(a, b)) return true;
  for (final T key in a.keys) {
    if (!a.containsKey(key) || !_elementEquals(a[key], b[key])) {
      return false;
    }
  }
  return true;
}