registerRoute method
Register routes from the current Module This can be used to conditionally register routes from the boot method.
Implementation
void registerRoute(String route, RouteWidgetBuilder builder) {
_validateRouteName(route);
if (shouldNamespaceRoutes) {
route = '$name$route';
}
AppRouter.registerRoute(route, builder);
}