QueryObserverAdded class final Advanced

An observer subscribed to the query. Emitted the moment the observer attaches, which is also what cancels the query's pending garbage collection. TanStack Query calls this event observerAdded.

Inheritance

Constructors

QueryObserverAdded(Query<Object?> query, QueryObserverRef observer)
Creates the event for query and the observer that attached.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
observer → QueryObserverRef
The observer that attached. Read-only from outside: it is an identity to hold and compare, not something to drive.
final
query → Query<Object?>
The query the event is about. Typed as Query<Object?>, since a cache listener sees every key; read dataType or get<T> it from the cache to recover the concrete type.
finalinherited
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