getBounds method

Rect getBounds(
  1. Size size
)

Gets the bounding rectangle for this shape.

By default, this returns a rectangle that encompasses the entire size. Shapes can override this if they have tighter bounds.

Parameters:

  • size - The size of the node

Returns a Rect that bounds the shape.

Implementation

Rect getBounds(Size size) {
  return Offset.zero & size;
}