KeepingStateInParameters enum

Automatic persisting of navigation state.

Once persisting of navigation state in destination parameters is enabled, the current stack will be serialized and saved in the DestinationParameters.stateParameterName parameter on navigation to a destination. When the destination with persisted navigation state is requested by the platform, the navigation stack will be deserialized from the parameter and explicitly set in the navigation controller.

Basically, persisting of navigation state in destination parameters make sense in web apps, to be able to restore arbitrary navigation stack when the user navigates to a destination through the browser history or a deeplink. To support this, the auto option is used in NavigatorBuilder by default.

When automatic persisting of navigation state is disabled, you still able to implement your custom logic manually, by providing proper Destination.upwardDestinationBuilder.

Inheritance

Constructors

KeepingStateInParameters()
const

Values

always → const KeepingStateInParameters

The navigation state will be always kept

auto → const KeepingStateInParameters

The navigation state will be only kept when the app is running on the Web platform.

none → const KeepingStateInParameters

The navigation state will not be kept automatically.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<KeepingStateInParameters>
A constant List of the values in this enum, in order of their declaration.