replace<E> method

Future<E?> replace<E>(
  1. RouteQuery routeQuery, [
  2. TransitionQuery? transitionQuery
])

Passing routeQuery replaces the currently displayed page with a new page.

The method of page transition can be specified with transitionQuery.

You can wait until the page is destroyed by the pop method with the return value Future.

In doing so, it can also receive the object passed by pop.

routeQueryを渡すことにより現在表示されているページを新しいページに置き換えます。

ページ遷移の方法をtransitionQueryで指定可能です。

戻り値のFuturepopメソッドでページが破棄されるまで待つことができます。

また、その際popで渡されたオブジェクトを受け取ることができます。

Implementation

Future<E?> replace<E>(
  RouteQuery routeQuery, [
  TransitionQuery? transitionQuery,
]) {
  pop();
  return push<E>(routeQuery, transitionQuery);
}