containsRect method

bool containsRect(
  1. Rect rect
)

Returns whether this rectangle contains the given rect.

Implementation

bool containsRect(Rect rect) {
  return x <= rect.x &&
      y <= rect.y &&
      right >= rect.right &&
      bottom >= rect.bottom;
}