EdgeInsets.fromWindowPadding constructor Null safety

EdgeInsets.fromWindowPadding(
  1. WindowPadding padding,
  2. double devicePixelRatio
)

Creates insets that match the given window padding.

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

Implementation

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