containsRect method

bool containsRect(
  1. Rect rect
)

Checks if a given rectangle is completely contained within this group.

Used for determining if a node is part of the group.

Implementation

bool containsRect(Rect rect) {
  final groupBounds = bounds;
  return groupBounds.contains(rect.topLeft) &&
      groupBounds.contains(rect.bottomRight);
}