scaledViewInsets property

EdgeInsets? scaledViewInsets
getter/setter pair

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:

  1. Find the percentage of screen height the original view insets are
  2. Calculate the number of pixels the same percentage of the scaled height is.
  3. Return calculated proportional insets

Implementation

EdgeInsets? scaledViewInsets;