selectTest method

bool selectTest(
  1. Rect selectRect,
  2. RenderObject? ancestor
)

Test the cursor drag zone is overlay this child-widget

Implementation

bool selectTest(Rect selectRect, RenderObject? ancestor) {
  final rb = context.findRenderObject();
  if (rb is RenderBox) {
    final paintRect = rb.paintBounds;
    final pos = rb.localToGlobal(Offset.zero, ancestor: ancestor);
    final realRect = paintRect.shift(pos);
    return selectRect.overlaps(realRect);
  }
  return false;
}