hitTest method
Test whether a point hits this render object.
Implementation
bool hitTest(HitTestResult result, {required Offset position}) {
if (Rect.fromLTWH(0, 0, size.width, size.height).contains(position)) {
result.add(this);
return hitTestChildren(result, position: position) ||
hitTestSelf(position);
}
return false;
}