QueryObserver<T> class final

Reactive lifecycle around one Query cache entry.

Implemented types

Constructors

QueryObserver(QueryClient client, QueryOptions<T> options)
Creates an observer for options on client.

Properties

client → QueryClient
The client that owns the observed query.
final
current → QueryResult<T>
The current UI-facing result.
no setter
enabled → bool
Whether this observer permits automatic fetching.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
isStatic → bool
Whether this observer treats data as immutable.
no setteroverride
options → QueryOptions<T>
The current query definition.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Releases timers and query subscriptions held by this observer.
fetchForSignal() → void
Starts a fetch requested by a runtime signal.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onQueryUpdate() → void
Receives query state changes.
override
refetch({bool cancelRefetch = true}) → Future<QueryResult<T>>
Fetches the query and returns the resulting state projection.
setOptions(QueryOptions<T> value) → void
Updates the definition without remounting the same cached query.
shouldRefetchOnFocus() → bool
Whether regaining focus should refetch the query.
override
shouldRefetchOnReconnect() → bool
Whether reconnecting should refetch the query.
override
subscribe(void listener(QueryResult<T> result)) → QueryDispose
Subscribes to results and starts observer-driven fetching.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited