pushReplacementPage<T extends Object?, TO extends Object?> method

Future<T?> pushReplacementPage<T extends Object?, TO extends Object?>(
  1. RouteQuery routePage, {
  2. TO? result,
  3. TransitionQuery? query,
})

Replace the current page with the new routePage.

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

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

現在のページを新しいroutePageに置き換えます。

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

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

Implementation

Future<T?> pushReplacementPage<T extends Object?, TO extends Object?>(
  RouteQuery routePage, {
  TO? result,
  TransitionQuery? query,
}) async {
  return pushReplacement<T, TO>(
    routePage.route<T>(query).createRoute(context),
    result: result,
  );
}