bounds property
Rect
get
bounds
Automatically calculated bounding rectangle for hit testing.
Based on currentVisualPosition and size. The framework uses this for automatic hit testing in containsPoint.
You typically don't need to override this unless you have a custom shape that requires non-rectangular hit testing.
Implementation
Rect get bounds => Rect.fromLTWH(
currentVisualPosition.dx,
currentVisualPosition.dy,
size.width,
size.height,
);