isOverObject method

  1. @override
bool isOverObject(
  1. Offset offset
)
override

Implementation

@override
bool isOverObject(Offset offset) {
  double distance1 =
      center.distanceToLine(location, location.translate(size.width, 0));
  double distance2 =
      center.distanceToLine(location, location.translate(0, size.height));
  return offset.isPointInsideOval(
      center, min(distance1, distance2), max(distance1, distance2));
}