pushDeepNavigation method
Implementation
Future<NavigationResult> pushDeepNavigation(T value,
{bool shouldUpdateBloc = true}) async {
final deepNavigationStrategy =
getDeepNavigationStrategy(currentMainNavigation);
if (!deepNavigationStrategy.shouldAcceptNavigation(
value, currentDeepNavigation)) {
navigateToError(shouldUpdateBloc: shouldUpdateBloc);
return NavigationResult.failed;
}
currentDeepNavigation =
currentDeepNavigation?.setLeaf(DeepNavigationNode<T>(value)) ??
DeepNavigationNode<T>(value);
if (shouldUpdateBloc) {
updateBloc();
}
return NavigationResult.success;
}