operator == method

  1. @override
bool operator ==(
  1. Object other
)
override

Deep equality.

A BuiltMap is only equal to another BuiltMap with equal key/value pairs in any order.

Implementation

@override
bool operator ==(Object other) {
  if (identical(other, this)) return true;
  if (other is! BuiltMap) return false;
  if (other.length != length) return false;
  if (other.hashCode != hashCode) return false;
  for (var key in keys) {
    if (other[key] != this[key]) return false;
  }
  return true;
}