QueryPolicy class final

Optional policy values layered by client defaults and a query definition.

Constructors

QueryPolicy({QueryFreshness? freshness, Duration? gcTime, QueryRetry? retry, Duration retryDelay(int failureCount, Object error)?, QueryNetworkMode? networkMode, QueryRefetchPolicy? refetchOnMount, QueryRefetchPolicy? refetchOnFocus, QueryRefetchPolicy? refetchOnReconnect, Duration? refetchInterval, bool? refetchInBackground, bool? enabled, bool? structuralSharing})
Creates a partial query policy.
const

Properties

enabled → bool?
Whether observers may fetch automatically.
final
freshness → QueryFreshness?
How long successful data remains fresh.
final
gcTime → Duration?
How long an unused query remains cached.
final
hashCode → int
The hash code for this object.
no setterinherited
networkMode → QueryNetworkMode?
How fetches respond to offline state.
final
refetchInBackground → bool?
Whether interval refetches may run without focus.
final
refetchInterval → Duration?
Optional periodic refetch interval.
final
refetchOnFocus → QueryRefetchPolicy?
Refetch behavior when the app regains focus.
final
refetchOnMount → QueryRefetchPolicy?
Refetch behavior when the first observer mounts.
final
refetchOnReconnect → QueryRefetchPolicy?
Refetch behavior when connectivity returns.
final
retry → QueryRetry?
The retry decision for failed fetches.
final
retryDelay → Duration Function(int failureCount, Object error)?
Computes the delay before each retry.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
structuralSharing → bool?
Whether equal subtrees preserve their previous references.
final

Methods

merge(QueryPolicy override) → QueryPolicy
Layers non-null values from override over this policy.
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