equals method

bool equals(
  1. GRect? toCompare
)

Determines whether toCompare parameter is equal to this object. This method compares the x, y, width, and height properties of an object against the same properties of this object.

Implementation

bool equals(GRect? toCompare) {
  if (toCompare == this) {
    return true;
  } else {
    return toCompare != null &&
        x == toCompare.x &&
        y == toCompare.y &&
        width == toCompare.width &&
        height == toCompare.height;
  }
}