popUntilRoot static method

void popUntilRoot(
  1. BuildContext context
)

Pops all routes from the split navigator until the root route.

context is the BuildContext of the current widget tree.

Implementation

static void popUntilRoot(BuildContext context) {
  final ZdsSplitNavigatorState? state = _safeState(context);
  if (state != null && state.mounted && state.widget.shouldSplit) {
    state.navigatorKey.currentState?.popUntil(ModalRoute.withName(ZdsSplitNavigator.emptyRoute));
  }
}