back<T> method
previousPage
can be null when the current page is the first participator
page.
Implementation
@override
@mustCallSuper
void back<T>(BackArguments args) {
if (args.previousPage != null) {
// Guarantees to pop all sub-routes, if some exists.
Navigator.of(args.context).popUntil(ModalRoute.withName(
args.currentPage.hashCode.toString(),
));
// Then pop the current page.
Navigator.of(args.context).pop(args.result);
} else {
Navigator.of(args.context).pop(args.result);
}
}