getBounds method

  1. @override
Rect getBounds()
override

Implementation

@override
Rect getBounds() {
  if (startPoint == null || endPoint == null) return Rect.zero;
  return Rect.fromPoints(startPoint!, endPoint!);
}