PageStorageKey<T> class

A Key that can be used to persist the widget state in storage after the destruction and will be restored when recreated.

Each key with its value plus the ancestor chain of other PageStorageKeys need to be unique within the widget's closest ancestor PageStorage. To make it possible for a saved value to be found when a widget is recreated, the key's value must not be objects whose identity will change each time the widget is created.

See also:

Inheritance

Constructors

PageStorageKey(T value)
Creates a ValueKey that defines where PageStorage values will be saved.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
The value to which this key delegates its operator==
finalinherited

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