operator == method

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

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

Implementation

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