canPop method

bool canPop (BuildContext context)

Whether the navigator that most tightly encloses the given context can be popped.

See also:

Implementation

static bool canPop(BuildContext context) {
  final NavigatorState navigator = Navigator.of(context, nullOk: true);
  return navigator != null && navigator.canPop();
}