keepStateInParameters property
bool
keepStateInParameters
Indicates if persisting of navigation state in destination parameters is needed.
When it is true, the following is happened on navigation to a destination:
- If DestinationSettings.reset is not set in the requested destination,
the current navigation state is saved in the requested destination parameters.
Particularly, the currentDestination is saved in the
DestinationParameters.upwardParameterName
parameter, and current destination of each nested NavigationController is saved in theDestinationParameters.nestedParameterName
parameter of the requested destination. - If DestinationSettings.reset is true, the navigation state is restored from the requested destination parameters.
Implementation
bool get keepStateInParameters =>
builder.keepStateInParameters == KeepingStateInParameters.always ||
builder.keepStateInParameters == KeepingStateInParameters.auto && kIsWeb;