computeMaxIntrinsicHeight method

double computeMaxIntrinsicHeight(
  1. double width
)

Computes the maximum intrinsic height at the given width.

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

Implementation

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