popAll static method

void popAll(
  1. BuildContext context, {
  2. bool rootNavigator = false,
  3. Object? result,
})

Implementation

static void popAll(
  BuildContext context, {
  bool rootNavigator = false,
  Object? result,
}) {
  final nested = Provided.find<NestedNavigatorContainer>(context);
  if (nested?.parent != null) {
    nested!.parent!.pop(result);
  } else {
    return Navigator.of(context, rootNavigator: rootNavigator).pop(result);
  }
}