routePop static method
bool
routePop(
- BuildContext context,
- BeamerDelegate delegate,
- RouteInformationSerializable state,
- BeamPage poppedPage,
Pops the last route from history and calls BeamerDelegate.update.
Implementation
static bool routePop(
BuildContext context,
BeamerDelegate delegate,
RouteInformationSerializable state,
BeamPage poppedPage,
) {
if (delegate.beamingHistoryCompleteLength < 2) {
return false;
}
delegate.removeLastHistoryElement();
final previousHistoryElement = delegate.removeLastHistoryElement()!;
delegate.update(
configuration: previousHistoryElement.routeInformation.copyWith(),
);
return true;
}