addRouter method
Allows you to add additional Router's to your project.
file: e.g. /lib/routes/account_router.dart accountRouter() => nyRoutes((router) { Add your routes here router.add(AccountPage.path); router.add(AccountUpdatePage.path); });
Usage in /app/providers/route_provider.dart e.g. Nylo.addRouter(accountRouter());
Implementation
addRouter(NyRouter router) async {
if (this.router == null) {
this.router = NyRouter();
}
this.router?.setRegisteredRoutes(router.getRegisteredRoutes());
this.router?.setUnknownRoutes(router.getUnknownRoutes());
NyNavigator.instance.router = this.router!;
}