DefaultOptions class Client
Client-wide defaults, passed to the QueryClient constructor or to QueryClient.setDefaultOptions.
They sit beneath key-specific defaults (QueryClient.setQueryDefaults, QueryClient.setMutationDefaults) and beneath each query's or mutation's own options: a field set closer to the call wins.
final client = QueryClient(
defaultOptions: const DefaultOptions(
queries: QueryDefaults(retry: RetryPolicy.times(1)),
mutations: MutationDefaults(networkMode: NetworkMode.always),
),
);
- Annotations
-
- @immutable
Constructors
- DefaultOptions({QueryDefaults? queries, MutationDefaults? mutations})
-
Creates the client-wide defaults; either half may be left out.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- mutations → MutationDefaults?
-
Applied to every mutation the client resolves, beneath any key-specific
QueryClient.setMutationDefaults.
final
- queries → QueryDefaults?
-
Applied to every query the client resolves, beneath any key-specific
QueryClient.setQueryDefaults.
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.
override