computeMaxIntrinsicWidth method

double computeMaxIntrinsicWidth(
  1. double height
)

Computes the maximum intrinsic width at the given height.

Performs a dry layout to determine the preferred width the layout would have with unconstrained width but constrained height.

Implementation

double computeMaxIntrinsicWidth(double height) {
  LayoutSize dryLayout = performLayout(
    LayoutConstraints(
      minWidth: 0,
      maxWidth: double.infinity,
      minHeight: 0,
      maxHeight: height,
    ),
    true,
  );
  return dryLayout.width;
}