popUntil function

void popUntil([
  1. RoutePredicate? predicate
])

循环pop 直到pop至指定页面

Implementation

void popUntil([RoutePredicate? predicate]) {
  assert(FlExtended().navigatorKey.currentState != null,
      'Set FlExtended().navigatorKey to one of [MaterialApp CupertinoApp WidgetsApp]');
  return FlExtended()
      .navigatorKey
      .currentState!
      .popUntil(predicate ?? (Route<dynamic> route) => route.isFirst);
}