pushNamedAndRemoveUntil<T extends Object?> static method

Future<T?> pushNamedAndRemoveUntil<T extends Object?>(
  1. String newRouteName,
  2. RoutePredicate predicate, {
  3. Object? arguments,
})

仿照 Navigator.pushNamedAndRemoveUntil 的方法,(会回调路由栈里的下一个页面的onResume和onPause方法)

Implementation

static Future<T?> pushNamedAndRemoveUntil<T extends Object?>(String newRouteName, RoutePredicate predicate, {Object? arguments}) {
  return Navigator.pushAndRemoveUntil(navigatorKey.currentContext!, instance._routeNamed(newRouteName, arguments: arguments), predicate);
}