pub struct PageStorageKey { /* private fields */ }Expand description
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 values must not be objects
whose identity will change each time the widget is created.
Dart’s PageStorageKey<T> extends ValueKey<T>; the value type is erased inside, as
GlobalKey’s is.
See also:
RestorationManager, which manages state restoration.
Implementations§
Source§impl PageStorageKey
impl PageStorageKey
Sourcepub fn new<T: PartialEq + Hash + Debug + 'static>(value: T) -> PageStorageKey
pub fn new<T: PartialEq + Hash + Debug + 'static>(value: T) -> PageStorageKey
Creates a PageStorageKey.
The value is the value to which this key delegates its equality.
Trait Implementations§
Source§impl Debug for PageStorageKey
impl Debug for PageStorageKey
Source§impl Key for PageStorageKey
impl Key for PageStorageKey
impl LocalKey for PageStorageKey
Auto Trait Implementations§
impl !RefUnwindSafe for PageStorageKey
impl !Send for PageStorageKey
impl !Sync for PageStorageKey
impl !UnwindSafe for PageStorageKey
impl Forget for PageStorageKey
impl Freeze for PageStorageKey
impl Move for PageStorageKey
impl Unpin for PageStorageKey
impl UnsafeUnpin for PageStorageKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more