addWithFallback method
void
addWithFallback(
- Widget screen,
- Widget fallBackScreen, {
- BaseContainerOptions? options = BaseContainerOptions.defaultSetup,
- BaseContainerOptions? fallOptions = BaseContainerOptions.defaultSetup,
- dynamic arguments,
creates a sequence where a fallback Screen is added to the viewHistory
Implementation
void addWithFallback(Widget screen, Widget fallBackScreen,
{BaseContainerOptions? options = BaseContainerOptions.defaultSetup,
BaseContainerOptions? fallOptions = BaseContainerOptions.defaultSetup,
dynamic arguments}) {
screenViewHistory =
fallBackScreen != screen ? [fallBackScreen, screen] : [screen];
optionsHistory =
fallOptions != options ? [fallOptions!, options!] : [options!];
if (arguments != null) routeArguments = arguments;
notifyListeners();
}