contains method

bool contains(
  1. Offset offset
)

Returns whether this rectangle contains the given offset.

Implementation

bool contains(Offset offset) {
  return offset.x >= x &&
      offset.x < right &&
      offset.y >= y &&
      offset.y < bottom;
}