navigate<T extends Object?> method
Pushes a new location to the current child's stack.
Implementation
Future<T?> navigate<T extends Object?>(
Location to, {
bool? replace,
bool? clearStack,
}) async {
Location? replaced;
if (clearStack ?? false) {
for (final l in currentRouterDelegate.currentConfiguration.locations) {
widget.configuration.clearLocation(l);
}
currentRouterDelegate.currentConfiguration.locations.clear();
} else if (replace ?? false) {
replaced =
currentRouterDelegate.currentConfiguration.locations.removeLast();
}
return _informationProviders[_currentIndex].navigate<T>(
to,
baseLocationStack: currentRouterDelegate.currentConfiguration,
replaced: replaced,
);
}