viewInsets property

WindowPadding viewInsets

The number of physical pixels on each side of the display rectangle into which the application can render, but over which the operating system will likely place system UI, such as the keyboard, that fully obscures any content.

When this changes, onMetricsChanged is called.

See also:

  • WidgetsBindingObserver, for a mechanism at the widgets layer to observe when this value changes.
  • MediaQuery.of, a simpler mechanism for the same.
  • Scaffold, which automatically applies the view insets in material design applications.

Implementation

WindowPadding get viewInsets => _viewInsets;