hitTest method
Used to implement touch behaviour of this dot, for example, it behaves like a square of getSize Check FlDotCirclePainter.hitTest for an example of an implementation
Implementation
@override
bool hitTest(
FlSpot spot,
Offset touched,
Offset center,
double extraThreshold,
) {
final distance = (touched - center).distance.abs();
return distance < radius + extraThreshold;
}