ListingSupport<S> mixin
- Superclass constraints
Properties
- first → S?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- id → String
-
id is used to uniquely identify multiple instances
of the same PersistableStateNotifier type.
In most cases it is not necessary;
however, if you wish to intentionally have multiple instances
of the same PersistableStateNotifier, then you must override id
and return a unique identifier for each PersistableStateNotifier instance
in order to keep the caches independent of each other.
no setterinherited
- last → S?
-
no setter
-
list
→ List<
S> -
no setter
- listId → String
-
listId is used to uniquely identify multiple instances
of the same PersistableStateNotifier type.
In most cases it is not necessary;
however, if you wish to intentionally have multiple instances
of the same PersistableStateNotifier, then you must override id
and return a unique identifier for each PersistableStateNotifier instance
in order to keep the caches independent of each other.
no setter
- listLength → int
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
snapshot
→ Stream<
List< S> > -
no setter
- state ↔ S
-
getter/setter pairinherited-getteroverride-setter
- storage → Storage
-
Instance of Storage which will be used to
manage persisting/restoring the StateNotifier state.
no setterinherited
- storagePrefix → String
-
Storage prefix which can be overridden to provide a custom
storage namespace.
Defaults to runtimeType but should be overridden in cases
where stored data should be resilient to obfuscation or persist
between debug/release builds.
no setterinherited
- storageToken → String
-
storageTokenis used as registration token for persistable storage. Composed of storagePrefix and id.no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
clear(
) → Future< void> -
clear is used to wipe or invalidate the cache of a PersistableStateNotifier.
Calling clear will delete the cached state of the StateNotifier
but will not modify the current state of the StateNotifier.
override
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
fromJson(
Map< String, dynamic> json) → S? -
Responsible for converting the
Map<String, dynamic>representation of the StateNotifier state into a concrete instance of the StateNotifier state.inherited -
getListItemId(
S state) → String -
getListItemId is used to generate a unique identifier for a
Swhen it is inserted on the list. This is used when id is not set. So, keep the value consistent across multiple calls. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onError(
Object error, StackTrace stackTrace) → void -
inherited
-
recover(
) → void -
Populates the internal state storage with the latest state.
inherited
-
remove(
String id) → Future< void> -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toJson(
S state) → Map< String, dynamic> ? -
Responsible for converting a concrete instance of the StateNotifier state
into the the
Map<String, dynamic>representation.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited