bool operator ==(other)

Source

bool operator ==(other) {
  if (other is! Rectangle) return false;
  return left == other.left &&
      top == other.top &&
      width == other.width &&
      height == other.height;
}