of static method

double of(
  1. BuildContext context
)

The bottom inset context's page keeps clear: the published one on a root, 0 outside any shell and on any route that is not first in its navigator — a pushed page, where the bar has yielded, or a sheet, which covers it.

Implementation

static double of(BuildContext context) =>
    ModalRoute.of(context)?.isFirst == false
    ? 0
    : context
              .dependOnInheritedWidgetOfExactType<ShellInsets>()
              ?.bottomInset ??
          0.0;