constrainHeight method

double constrainHeight ([double height = double.infinity ])

Returns the height that both satisfies the constraints and is as close as possible to the given height.

Implementation

double constrainHeight([double height = double.infinity]) {
  assert(debugAssertIsValid());
  return height.clamp(minHeight, maxHeight);
}