effectiveConstraints method

BoxConstraints effectiveConstraints(
  1. BoxConstraints constraints
)

Return a copy of constraints whose minimum width and height have been updated with the baseSizeAdjustment.

The resulting minWidth and minHeight values are clamped to not exceed the maxWidth and maxHeight values, respectively.

Implementation

BoxConstraints effectiveConstraints(BoxConstraints constraints) {
  assert(constraints.debugAssertIsValid());
  return constraints.copyWith(
    minWidth: clampDouble(constraints.minWidth + baseSizeAdjustment.dx, 0.0, constraints.maxWidth),
    minHeight: clampDouble(constraints.minHeight + baseSizeAdjustment.dy, 0.0, constraints.maxHeight),
  );
}