double getMaxIntrinsicWidth(double height, int childCount)

Returns the smallest width beyond which increasing the width never decreases the preferred height.

Override this to provide a more efficient or more correct solution. The default implementation actually instantiates a grid specification and measures the grid at the given height and child count.

For more details on implementing this method, see RenderBox.computeMaxIntrinsicWidth.

Source

double getMaxIntrinsicWidth(double height, int childCount) {
  final double width = _getGridSize(new BoxConstraints.tightForFinite(height: height), childCount).width;
  if (width.isFinite)
    return width;
  return 0.0;
}