routeWithConfiguration method
Takes StandardRouteData data and performs page navigation.
This function is used when a reference to context is not available,
for example, when navigating from a plugin.
configuration represents the page data to be passed to goWithResult,
navigationMode is an optional mode of StandardPageNavigationMode to use during navigation.
pushParentPage indicates whether to push the parent page when navigating to a child page. default is true.
Implementation
void routeWithConfiguration(
StandardRouteData configuration, [
StandardPageNavigationMode? navigationMode,
bool pushParentPage = true,
]) {
if (kIsWeb || StandardAppPlugin.debugIsWeb) {
if (configuration.factory == null) {
throw WebPageNotFound();
}
}
configuration.factory?.goWithResult(
configuration.pageData,
navigationMode,
pushParentPage,
);
}