setNewRoutePath method
Called by the Router when the Router.routeInformationProvider reports that a new route has been pushed to the application by the operating system.
Consider using a SynchronousFuture if the result can be computed synchronously, so that the Router does not need to wait for the next microtask to schedule a build.
Implementation
@override
SynchronousFuture<void> setNewRoutePath(RouteInformation configuration) {
if (configuration.uri.path == '/' && initialPath != '/') {
configuration = configuration.copyWith(uri: Uri.parse(initialPath));
}
update(configuration: configuration);
return SynchronousFuture(null);
}