getMaxHeight method
Implementation
double? getMaxHeight({double? heightParent})
{
double? height;
// height
if (maxHeight != null)
{
height = maxHeight;
}
// percentage height based on parent
else if (maxHeightPercentage != null && heightParent != null)
{
height = ((maxHeightPercentage!/100) * heightParent);
}
// cannot be negative
if (height != null && height.isNegative)
{
height = 0;
}
return height;
}