getHeight function

double getHeight(
  1. int percent,
  2. BuildContext context
)

Returns the height based on the specified percentage of the screen height.

Implementation

double getHeight(int percent, BuildContext context) {
  return (MediaQuery.of(context).size.height * (percent / 100)).toDouble();
}