OverlaySafeArea.of constructor

OverlaySafeArea.of(
  1. BuildContext context
)

Creates an OverlaySafeArea from the given context.

Implementation

factory OverlaySafeArea.of(BuildContext context) {
  final padding = MediaQuery.paddingOf(context);
  return OverlaySafeArea(
    top: AppBarHeight.maybeOf(context) ?? padding.top,
    bottom: BottomBarHeight.maybeOf(context) ?? padding.bottom,
    left: padding.left,
    right: padding.right,
  );
}