hitTest method

  1. @override
bool hitTest(
  1. Offset point
)
override

Implementation

@override
bool hitTest(Offset point) {
  if (xPosition == null) return false;
  const tolerance = 5.0;
  return (point.dx - xPosition!).abs() <= tolerance;
}