BoxConstraints class

Box constraints for layout.

Constructors

BoxConstraints({double minWidth = 0, double maxWidth = double.infinity, double minHeight = 0, double maxHeight = double.infinity})
BoxConstraints.expand({double? width, double? height})
BoxConstraints.tight(Size size)

Properties

hasBoundedHeight bool
no setter
hasBoundedWidth bool
no setter
hashCode int
The hash code for this object.
no setteroverride
isTight bool
no setter
maxHeight double
final
maxWidth double
final
minHeight double
final
minWidth double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

constrain(Size size) Size
constrainHeight(double height) double
constrainWidth(double width) double
loosen() BoxConstraints
Returns a copy with the minimum constraints removed (set to zero), keeping the maximum constraints unchanged.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override