useSafeArea property

bool useSafeArea
final

Determines whether the widget should respect the safe area insets (such as notches, status bars, and navigation bars).

When set to true, the widget’s content avoids system UI intrusions by applying appropriate padding based on the current safe area.


Keyboard Insets Integration

When combined with the keyboard_insets package, this flag ensures that the bottom padding remains stable during keyboard animations, preventing visual jumps when the keyboard appears or hides.

If this flag sets to true make sure to handle its lifecycle properly:

@override
void initState() {
  super.initState();
  PersistentSafeAreaBottom.startObservingSafeArea();
}

@override
void dispose() {
  PersistentSafeAreaBottom.stopObservingSafeArea();
  super.dispose();
}

Implementation

final bool useSafeArea;