hitTestBoxChild method
bool
hitTestBoxChild({
- required RenderBox child,
- required Offset position,
- required Matrix4 transform,
- required bool checkBounds,
override
Hit tests a RenderBox child at position
with a transform
.
Implementation
@override
bool hitTestBoxChild({
required RenderBox child,
required Offset position,
required Matrix4 transform,
required bool checkBounds,
}) {
return BoxHitTestResult.wrap(hitTestResult!).addWithPaintTransform(
transform: transform,
position: position,
hitTest: (result, position) {
if (checkBounds && !(Offset.zero & child.size).contains(position)) {
return false;
}
return child.hitTest(result, position: position);
},
);
}