padding property
final
The parts of the display that are partially obscured by system UI, typically by the hardware display "notches" or the system status bar.
If this padding is consumed (e.g. by building a widget that envelops or accounts for this padding in its layout in such a way that children are no longer exposed to this padding), then the MediaQuery.removePadding constructor should be used to remove this padding for descendants in the widget tree.
Padding is derived from the values of viewInsets and viewPadding.
See also:
- FlutterView, which provides some additional detail about this property and how it relates to viewInsets and viewPadding.
- SafeArea, a widget that consumes this padding with a Padding widget and automatically removes it from the MediaQuery for its child.
Implementation
final EdgeInsets padding;