getVerticalSize function
This method is used to set padding/margin (for the top and bottom side) and height of the screen or widget according to the Viewport height.
Implementation
double getVerticalSize(double px) {
num statusBar = MediaQueryData.fromView(window).viewPadding.top;
num screenHeight = size.height - statusBar;
return px * (screenHeight / 812);
}