resetAndPushPage<T extends Object?> method

Future<T?> resetAndPushPage<T extends Object?>(
  1. RouteQuery newRoutePage, [
  2. TransitionQuery? query
])

After returning to the first page, you will be redirected to the newRoutePage page.

If there is a RedirectQuery in newRoutePage and the condition is met, the user may be redirected to that page.

You can specify page transitions, etc. by giving query.

最初のページに戻った後newRoutePageのページに遷移します。

newRoutePage内にRedirectQueryがあり条件に合致した場合、そのページに遷移する場合があります。

queryを与えることでページのトランジションなどを指定することができます。

Implementation

Future<T?> resetAndPushPage<T extends Object?>(
  RouteQuery newRoutePage, [
  TransitionQuery? query,
]) async {
  final route = newRoutePage.route<T>(query);
  return resetAndPush<T>(
    route.createRoute(context),
  );
}