unregisterFromRestoration method
- RestorableProperty<
Object?> property
Unregisters a RestorableProperty from state restoration.
The value of the property
is removed from the restoration data and it
will not be restored if that data is used in a future state restoration.
Calling this method is uncommon, but may be necessary if the data of a RestorableProperty is only relevant when the State object is in a certain state. When the data of a property is no longer necessary to restore the internal state of a State object, it may be removed from the restoration data by calling this method.
Implementation
@protected
void unregisterFromRestoration(RestorableProperty<Object?> property) {
assert(property._owner == this);
_bucket?.remove<Object?>(property._restorationId!);
_unregister(property);
}