systemInsetsOf static method

EdgeInsets systemInsetsOf(
  1. PreviewPlatform platform, {
  2. ExpressiveNavigationMode mode = ExpressiveNavigationMode.gesture,
})

The safe-area insets the platform's system bars take, the Android navigation bar drawn in mode: what a previewed page reads as MediaQuery.padding.

Implementation

static EdgeInsets systemInsetsOf(
  PreviewPlatform platform, {
  ExpressiveNavigationMode mode = ExpressiveNavigationMode.gesture,
}) => switch (platform) {
  PreviewPlatform.android => EdgeInsets.only(
    top: _SystemBarMetrics.androidStatusBar,
    bottom: mode == ExpressiveNavigationMode.gesture
        ? _SystemBarMetrics.androidGestureBar
        : _SystemBarMetrics.androidThreeButtonBar,
  ),
  PreviewPlatform.ios => const EdgeInsets.only(
    top: _SystemBarMetrics.iosStatusBar,
    bottom: _SystemBarMetrics.iosHomeIndicatorInset,
  ),
};