push<E> method

Future<E?> push<E>(
  1. AppRouter? router, [
  2. TransitionQuery? transitionQuery
])

Passing router will take you to 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.

routerを渡すことにより新しいページに遷移します。

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

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

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

Implementation

Future<E?> push<E>(
  AppRouter? router, [
  TransitionQuery? transitionQuery,
]) {
  if (router == null) {
    return Future.value();
  }
  return router.push<E>(
    this,
    transitionQuery,
  );
}