padding property Null safety
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 you consumed this padding (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), you should remove this padding for subsequent descendants in the widget tree by inserting a new MediaQuery widget using the MediaQuery.removePadding factory.
Padding is derived from the values of viewInsets and viewPadding.
See also:
- ui.window, 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;