go method
Implementation
Future<R?> go(
BuildContext context, {
P? args,
bool replace = false,
bool useRootNavigator = false,
bool nestModals = false,
NavigatorState? navigator,
}) async {
final routes = SunnyRouting.router;
if (R == dynamic) {
return (await routes.navigateToDynamicRoute(
context,
this,
replace: replace,
parameters: args ?? (const DefaultRouteParams()),
rootNavigator: useRootNavigator,
navigator: navigator,
)) as R?;
} else {
return routes.navigateToRoute<R, P>(
context,
this!,
replace: replace,
parameters: args ?? const DefaultRouteParams() as P,
rootNavigator: useRootNavigator,
navigator: navigator,
);
}
}