resetAndPushNamed<E> method

Future<E?> resetAndPushNamed<E>(
  1. String path, [
  2. TransitionQuery? transitionQuery
])

Continue pop until the history stack runs out, then push to the RouteQuery that applies to path.

The method of page transition can be specified with transitionQuery.

ヒストリーのスタックがなくなるまでpopし続けた後pathに当てはまるRouteQuerypushします。

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

Implementation

Future<E?> resetAndPushNamed<E>(
  String path, [
  TransitionQuery? transitionQuery,
]) {
  var index = _pageStack.length - 1;
  while (index >= 0) {
    final container = _pageStack.removeAt(index);
    container.completer.complete(null);
    index -= 1;
  }
  return pushNamed<E>(path, transitionQuery);
}