hitTestIntrinsicChild method

bool hitTestIntrinsicChild(
  1. BoxHitTestResult result,
  2. RenderBox? child,
  3. Offset position
)

Implementation

bool hitTestIntrinsicChild(BoxHitTestResult result, RenderBox? child, Offset position) {
  final bool isHit = result.addWithPaintTransform(
    transform: renderStyle.effectiveTransformMatrix,
    position: position,
    hitTest: (BoxHitTestResult result, Offset position) {
      if (child?.hasSize == false) return false;

      return child?.hitTest(result, position: position) ?? false;
    },
  );
  if (isHit) return true;
  return false;
}