hitTest method

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

Implementation

@override
bool hitTest(Offset point) {
  if (startPoint == null || directionPoint == null) return false;
  const tolerance = 5.0;
  final direction = (directionPoint! - startPoint!).direction;
  final distance = _distanceFromPointToRay(point, startPoint!, direction);
  return distance <= tolerance;
}