clipBehavior property

Clip clipBehavior

The content will be clipped (or not) according to this option.

See the enum Clip for details of all possible options and their common use cases.

Stacks only clip children whose geometry overflows the stack. A child that paints outside its bounds (e.g. a box with a shadow) will not be clipped, regardless of the value of this property. Similarly, a child that itself has a descendant that overflows the stack will not be clipped, as only the geometry of the stack's direct children are considered. Transform is an example of a widget that can cause its children to paint outside its geometry.

To clip children whose geometry does not overflow the stack, consider using a ClipRect widget.

Defaults to Clip.hardEdge.


final Clip clipBehavior;