BoxConstraints class

Constraints for layout, similar to Flutter's BoxConstraints.

Defines min/max width and height that a RenderObject can occupy.

Constructors

BoxConstraints({int minWidth = 0, int maxWidth = 0x3FFFFFFF, int minHeight = 0, int maxHeight = 0x3FFFFFFF})
const
BoxConstraints.loose(Size size)
BoxConstraints.tight(Size size)
BoxConstraints.tightFor({int? width, int? height})
BoxConstraints.tightSize(int w, int h)

Properties

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

Methods

constrain(Size size) Size
copyWith({int? minWidth, int? maxWidth, int? minHeight, int? maxHeight}) BoxConstraints
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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