getMinHeight method

double? getMinHeight({
  1. double? heightParent,
})

Implementation

double? getMinHeight({double? heightParent})
{
  double? height;

  // height
  if (minHeight != null)
  {
    height = minHeight;
  }

  // percentage height based on parent
  else if (minHeightPercentage != null && heightParent != null)
  {
    height = ((minHeightPercentage!/100) * heightParent);
  }

  // cannot be negative
  if (height != null && height.isNegative)
  {
    height = 0;
  }

  return height;
}