hitTestChildren method
HIT TEST
Implementation
@override
bool hitTestChildren(BoxHitTestResult result, {required Offset position}) {
for (final child in children) {
final parentData = child.parentData! as BoxParentData;
final isHit = result.addWithPaintOffset(
offset: parentData.offset,
position: position,
hitTest: (BoxHitTestResult result, Offset transformed) {
assert(transformed == position - parentData.offset);
return child.hitTest(result, position: transformed);
},
);
if (isHit) {
return true;
}
}
return false;
}