bool hitTest(HitTestResult result, { Point position })

Determines the set of render objects located at the given position.

Returns true if the given point is contained in this render object or one of its descendants. Adds any render objects that contain the point to the given hit test result.

The position argument is in the coordinate system of the render view.

Source

bool hitTest(HitTestResult result, { Point position }) {
  if (child != null)
    child.hitTest(result, position: position);
  result.add(new HitTestEntry(this));
  return true;
}