reset<E> method

void reset<E>([
  1. E? result
])

Continue to pop until the history stack runs out.

The result of pop is returned by result.

ヒストリーのスタックがなくなるまでpopし続けます。

popした結果をresultで返します。

Implementation

void reset<E>([E? result]) {
  var index = _pageStack.length - 1;
  while (index >= 0) {
    final container = _pageStack.removeAt(index);
    container.completer.complete(result);
    index -= 1;
  }
  _routerDelegate.notifyListeners();
}