getPixelSize method Null safety

double getPixelSize(
  1. double d,
  2. BuildContext context
)

It translates the given percentage of the screen d and returns the pixels.

Example: If the screen height is 200 pixels and the given percentage is 50 This function returns 100.

Implementation

static double getPixelSize(double d, BuildContext context) {
  return d * getScreenSize(context).height;
}