containsOffset method

bool containsOffset(
  1. RenderObject? ancestor,
  2. Offset offset
)

Implementation

bool containsOffset(RenderObject? ancestor, Offset offset) {
  final box = renderObject as RenderBox;
  final rect = box.localToGlobal(Offset.zero, ancestor: ancestor) & box.size;
  return rect.contains(offset);
}