scaledViewInsets property
Simulated view inset calculations.
The viewInset
is dependent upon the
scaledWidth and scaledHeight respectively.
If the screen is scaled, the view insets should
be scaled to preserve the aspect ratio.
The scaledViewInsets are computed with the
following algorithm:
- Find the percentage of screen height the original view insets are
- Calculate the number of pixels the same percentage of the scaled height is.
- Return calculated proportional insets
Implementation
EdgeInsets? scaledViewInsets;