componentForRouteName static method
This function returns the screen view from its name.
Implementation
static cupertino.Widget componentForRouteName(String s) {
try {
final scr = screens.firstWhere((routeItem) {
print(
"\n### Screen name = ${routeItem[#name]}, Widget = $routeItem match ? = $s");
return routeItem[#name] == s;
}, orElse: () => {#screen: null})['screen' as Symbol];
return scr;
} catch (e, st) {
return KareeRouterErrorWidget('No Screen found with name `$s`', st,
KareeErrorCode.screenNotFound, [s]);
}
}