double getMinIntrinsicHeight(double width, int childCount)

Return the minimum height that this grid could be without failing to paint its contents within itself.

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.computeMinIntrinsicHeight.

Source

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