popUntilPath method

void popUntilPath(
  1. BuildContext context,
  2. String ancestorPath
)

Implementation

void popUntilPath(BuildContext context, String ancestorPath) {
  while (routerDelegate.currentConfiguration.matches.last.matchedLocation != ancestorPath) {
    if (!context.canPop()) {
      return;
    }
    context.pop();
  }
}