EdgeInsets.fromViewPadding constructor

EdgeInsets.fromViewPadding(
  1. ViewPadding padding,
  2. double devicePixelRatio
)

Creates insets that match the given view padding.

If you need the current system padding or view insets in the context of a widget, consider using MediaQuery.paddingOf to obtain these values rather than using the value from a FlutterView directly, so that you get notified of changes.

Implementation

EdgeInsets.fromViewPadding(ui.ViewPadding padding, double devicePixelRatio)
  : left = padding.left / devicePixelRatio,
    top = padding.top / devicePixelRatio,
    right = padding.right / devicePixelRatio,
    bottom = padding.bottom / devicePixelRatio;