intersects method

bool intersects(
  1. Rect other
)

Whether this rectangle overlaps with other.

Implementation

bool intersects(Rect other) =>
    x < other.right && right > other.x &&
    y < other.bottom && bottom > other.y;