performBoxLayout method

void performBoxLayout(
  1. BoxConstraints constraints
)

Perform layout with typed box constraints

Subclasses override this instead of performLayout. The default implementation sizes to the maxima, treating an unbounded axis as the corresponding lower bound.

Implementation

void performBoxLayout(BoxConstraints constraints) {
  size = Size(
    constraints.maxWidth ?? constraints.minWidth,
    constraints.maxHeight ?? constraints.minHeight,
  );
}