ConstrainedBoxExtension extension
Extension methods for Widget that provide convenient ways to apply BoxConstraints using ConstrainedBox.
These methods allow for fluent chaining and provide shortcuts for common constraint patterns, making it easier to control widget sizing without verbose ConstrainedBox constructors.
- on
Methods
-
constrained(
{double minWidth = 0.0, double maxWidth = double.infinity, double minHeight = 0.0, double maxHeight = double.infinity}) → ConstrainedBox -
Available on Widget, provided by the ConstrainedBoxExtension extension
Wraps this widget in a ConstrainedBox with customizable width and height constraints. -
constrainedBox(
{required BoxConstraints constraints}) → ConstrainedBox -
Available on Widget, provided by the ConstrainedBoxExtension extension
Wraps this widget in a ConstrainedBox with the specifiedconstraints. -
constrainedHeight(
{double min = 0, double max = double.infinity}) → ConstrainedBox -
Available on Widget, provided by the ConstrainedBoxExtension extension
Wraps this widget in a ConstrainedBox with height-only constraints. -
constrainedWidth(
{double min = 0, double max = double.infinity}) → ConstrainedBox -
Available on Widget, provided by the ConstrainedBoxExtension extension
Wraps this widget in a ConstrainedBox with width-only constraints. -
maxHeight(
double maxHeight) → ConstrainedBox -
Available on Widget, provided by the ConstrainedBoxExtension extension
Wraps this widget in a ConstrainedBox with a maximum height constraint. -
maxWidth(
double maxWidth) → ConstrainedBox -
Available on Widget, provided by the ConstrainedBoxExtension extension
Wraps this widget in a ConstrainedBox with a maximum width constraint. -
minHeight(
double minHeight) → ConstrainedBox -
Available on Widget, provided by the ConstrainedBoxExtension extension
Wraps this widget in a ConstrainedBox with a minimum height constraint. -
minWidth(
double minWidth) → ConstrainedBox -
Available on Widget, provided by the ConstrainedBoxExtension extension
Wraps this widget in a ConstrainedBox with a minimum width constraint.