onRoute function
void
onRoute(
- dynamic function()
Binds the function
to a router event.
Implementation
void onRoute(Function() function) {
window.addEventListener(routerEvent, (event) => function.call());
}