Skip to main content
The Stac BoxConstraints class specifies minimum and maximum dimensions for a widget. It’s commonly used with ConstrainedBox or as part of button styles.

Properties

Example

Common Constraint Patterns

Fixed Width

Minimum Size

Maximum Size

With Button Style

Infinite Constraints

Use double.infinity for unbounded constraints: