getUnknownRoute static method
Find the unknown route.
Implementation
static NyRouterRoute getUnknownRoute() {
List<MapEntry<String, NyRouterRoute>> unknownRoutes = NyNavigator
.instance
.router
._routeUnknownMappings
.entries
.where((element) => element.value.getUnknownRoute() == true)
.toList();
if (unknownRoutes.isNotEmpty) {
return unknownRoutes.first.value;
}
return NyRouterRoute(name: "/404", view: (context) => const PageNotFound());
}