onSystemPop method
Called when a system pop event occurs. This happens on android when the system back button is pressed.
Use vRedirector
if you want to redirect or stop the navigation.
DO NOT use VRouter methods to redirect.
vRedirector
also has information about the route you leave and the route you go to
The route you go to is calculated based on VRouterState._defaultPop
Note that you should consider the systemPop cycle to
handle this precisely, see https://vrouter.dev/guide/Advanced/Pop%20Events/onSystemPop
Also see:
- VRouter.onSystemPop for route level onSystemPop
- VWidgetGuard.onSystemPop for widget level onSystemPop
- VRedirector to known how to redirect and have access to route information
Implementation
@override
Future<void> onSystemPop(VRedirector vRedirector) =>
_onSystemPop(vRedirector);