applyConstraints method

AxisSize applyConstraints(
  1. BoxConstraints constraints,
  2. Axis direction
)

Implementation

AxisSize applyConstraints(BoxConstraints constraints, Axis direction) {
  final BoxConstraints effectiveConstraints = switch (direction) {
    Axis.horizontal => constraints,
    Axis.vertical => constraints.flipped,
  };
  return AxisSize._(effectiveConstraints.constrain(_size));
}