CellConstraints class final

Integer cell constraints passed parent-to-child during layout.

Unbounded axes are represented as a null maxCols/maxRows rather than double.maxFinite. This avoids floating-point math in the cell grid and makes "no upper bound" explicit at the type level.

Annotations
  • @immutable

Constructors

CellConstraints({int minCols = 0, int? maxCols, int minRows = 0, int? maxRows})
const
CellConstraints.loose(CellSize size)
Constraints that allow anything from zero up to size.
CellConstraints.tight(CellSize size)
Constraints that require the exact size.

Properties

hasBoundedHeight → bool
no setter
hasBoundedWidth → bool
no setter
hashCode → int
The hash code for this object.
no setteroverride
isTight → bool
no setter
maxCols → int?
final
maxRows → int?
final
minCols → int
final
minRows → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

constrain(CellSize size) → CellSize
constrainHeight(int rows) → int
constrainWidth(int cols) → int
isSatisfiedBy(CellSize size) → bool
loosen() → CellConstraints
Returns constraints with the same upper bounds but minCols / minRows dropped to zero — used when a parent wants its child to be as small as it wants to be inside an outer envelope.
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