SafeAreaConfig class Null safety

Apply necessary top, bottom and sides (left and right) padding to the panel to avoid OS intrusions like notch, status bar and nav-bar.

This is much like SafeArea. This does NOT apply padding to the PanelContent.bodyContent. This allows us for example, to have the panel avoid intrusions while still allowing bodyContent to occupy whole available space. The BackdropConfig's shadow is also not affected by this. So, you always get full-screen shadow.

This can be used on any type of panel.

Default : SafeAreaConfig.all.

Constructors

SafeAreaConfig({bool top = false, bool bottom = false, bool sides = false, bool removePaddingFromContent = false, bool bodyHasSlivers = false})
Apply no padding.
const
SafeAreaConfig.all({bool? removePaddingFromContent, bool? bodyHasSlivers})
Apply padding on all sides: top, bottom, left and right.
const

Properties

bodyHasSlivers bool
If PanelContent.bodyContent is a CustomScrollView (e.g., slivers), you may see additional space in your PanelContent.panelContent.
final
bottom bool
Whether to apply padding on bottom side of panel.
final
hashCode int
The hash code for this object.
read-onlyinherited
removePaddingFromContent bool
If true, padding derived from MediaQuery will NOT be added to the PanelContent. Some widgets like ListTile add the padding automatically. Set this to true to prevent them adding the extra space.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
sides bool
Whether to apply padding on both sides (left and right) of panel.
final
top bool
Whether to apply padding on top side of panel.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited