route method
Navigate to a page with the specified location.
navigationMode represents the mode of StandardPageNavigationMode to use during navigation (optional).
pushParentPage indicates whether to push the parent page when navigating to a child page. default is true.
Implementation
void route(
String location, [
StandardPageNavigationMode? navigationMode,
bool pushParentPage = true,
]) async {
assert(routerDelegate is StandardRouterDelegate);
final tDelegate = routerDelegate as StandardRouterDelegate;
final tConfiguration = await routeInformationParser?.parseRouteInformation(
RouteInformation(uri: Uri.parse(location)),
);
if (tConfiguration != null) {
tDelegate.routeWithConfiguration(
tConfiguration,
navigationMode,
pushParentPage,
);
}
}