hitTest method

bool hitTest(
  1. HitTestResult result,
  2. Offset position
)

Hit-test this render object using position in local coordinates.

Implementation

bool hitTest(HitTestResult result, Offset position) {
  final snapshot = children.toList(growable: false);
  for (final child in snapshot.reversed) {
    if (child.hitTest(result, position - Offset(child.x, child.y))) {
      return true;
    }
  }
  return false;
}