Something happened to a query in the cache: what QueryCache.subscribe
delivers to its listeners.
Sealed, so a listener can switch over it exhaustively. The events are:
- QueryAdded — a query was created in the cache.
- QueryRemoved — a query left the cache.
- QueryUpdated — a query's state changed; carries the QueryAction.
- QueryObserverAdded / QueryObserverRemoved — an observer attached to or detached from a query.
- QueryObserverOptionsUpdated — an observer's options changed.
- QueryObserverResultsUpdated — an observer delivered a new result.
Events are for watching: logging, devtools, persisting the cache. To
react to a fetch's outcome, the QueryCache constructor's onSuccess,
onError and onSettled hooks are simpler.
- Implementers
- Annotations
-
- @immutable
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
query
→ Query<
Object?> -
The query the event is about. Typed as
Query<Object?>, since a cache listener sees every key; readdataTypeorget<T>it from the cache to recover the concrete type.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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