PersistedState<T extends PersistableState> mixin
Properties
-
boxName
→ String
-
no setter
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
ref
→ AutoDisposeNotifierProviderRef<T>
-
The
Ref
from the provider associated with this Notifier
.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
↔ T
-
The value currently exposed by this
Notifier
.
getter/setter pairinherited-getter
-
stateOrNull
→ T?
-
The value currently exposed by this
Notifier
.
no setterinherited
Methods
-
build()
→ T
-
Initialize an
AsyncNotifier
.
inherited
-
fromJson(Map<String, dynamic> json)
→ T
-
-
listenSelf(void listener(T? previous, T next), {void onError(Object error, StackTrace stackTrace)?})
→ void
-
Listens to changes on the value exposed by this provider.
inherited
-
loadPersistedState()
→ dynamic
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onStateLoaded(T loadedState)
→ Future<T?>
-
Hook called after state is loaded from persistence but before it's set.
Override this to perform validation or migration logic.
Return
null
to prevent the loaded state from being applied.
-
persistState()
→ dynamic
-
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateShouldNotify(T previous, T next)
→ bool
-
A method invoked when the state exposed by this
Notifier
changes.
It compares the previous and new value, and return whether listeners
should be notified.
inherited