beforeEnter method
This is called before the url is updated if this VRouteElement was NOT in the previous route but is in the new route
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
Note that you should consider the navigation cycle to
handle this precisely, see https://vrouter.dev/guide/Advanced/Navigation%20Control/The%20Navigation%20Cycle
Also see:
- VRouter.beforeEnter for router level beforeEnter
- VRedirector to known how to redirect and have access to route information
Implementation
@override
Future<void> beforeEnter(VRedirector vRedirector) =>
voidBeforeEnter(vRedirector);