QueryConfig class

Configuration for a query reacton.

Constructors

QueryConfig({Duration staleTime = const Duration(minutes: 5), Duration cacheTime = const Duration(minutes: 30), bool refetchOnReconnect = false, bool refetchOnResume = false, Duration? pollingInterval, RetryPolicy? retryPolicy})
const

Properties

cacheTime Duration
How long unused data stays in cache after all watchers unsubscribe. After this, the data is garbage collected.
final
hashCode int
The hash code for this object.
no setterinherited
pollingInterval Duration?
Polling interval. If set, the query refetches at this interval.
final
refetchOnReconnect bool
If true, automatically refetch when connectivity is restored.
final
refetchOnResume bool
If true, automatically refetch when the app returns to foreground.
final
retryPolicy RetryPolicy?
Retry policy for failed queries.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
staleTime Duration
How long data is considered "fresh" before becoming stale. While fresh, re-fetches are skipped and cached data is returned.
final

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