getHorizontalSize function

double getHorizontalSize(
  1. double px
)

This method is used to set padding/margin (for the left and Right side) and width of the screen or widget according to the Viewport width.

Implementation

double getHorizontalSize(double px) => px * (size.width / 375);