contentIntrinsicWidth function

double contentIntrinsicWidth(
  1. RenderBox box, {
  2. required bool max,
  3. required double height,
})

The min- or max-content width of box, past any width it states.

Implementation

double contentIntrinsicWidth(RenderBox box, {required bool max, required double height}) {
  if (box is StatedWidth) {
    final inner = box.child;
    if (inner != null) return contentIntrinsicWidth(inner, max: max, height: height);
  }
  return max ? box.getMaxIntrinsicWidth(height) : box.getMinIntrinsicWidth(height);
}