pop<E> method
void
pop<E>([
- E? result
Discards the current page and returns to the previous page.
If canPop is false
, the application is terminated.
By passing a value to result
, an object can be passed to the return value of push or replace.
現在のページを破棄し、前のページに戻ります。
canPopがfalse
の場合、アプリを終了します。
Implementation
void pop<E>([E? result]) {
if (!canPop()) {
SystemNavigator.pop();
return;
}
final container = _pageStack.removeLast();
container.completer.complete(result);
_routerDelegate.notifyListeners();
}