MutationOptions<T, V> class
Mutation options
Constructors
-
MutationOptions({MutationFetcher<
T, V> ? mutationFn, RetryConfig retryConfig = const RetryConfig(attempts: 0), NetworkMode networkMode = NetworkMode.online, void onSuccess(T data, V variables)?, void onError(Object error, V variables)?, void onSettled(T? data, Object? error, V variables)?, void onMutate(V variables)?, List<List< invalidateQueries = const [], List<Object> >List< refetchQueries = const [], Map<Object> >String, dynamic> ? meta}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
invalidateQueries
→ List<
List< Object> > -
Query keys to invalidate on success
final
-
meta
→ Map<
String, dynamic> ? -
Mutation metadata
final
-
mutationFn
→ MutationFetcher<
T, V> ? -
Mutation function
final
- networkMode → NetworkMode
-
Network mode for the mutation
final
- onError → void Function(Object error, V variables)?
-
Callback for mutation error
final
- onMutate → void Function(V variables)?
-
Callback before mutation starts
final
- onSettled → void Function(T? data, Object? error, V variables)?
-
Callback for settled mutation
final
- onSuccess → void Function(T data, V variables)?
-
Callback for successful mutation
final
-
refetchQueries
→ List<
List< Object> > -
Query keys to refetch on success
final
- retryConfig → RetryConfig
-
Retry configuration for mutations
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{MutationFetcher< T, V> ? mutationFn, RetryConfig? retryConfig, NetworkMode? networkMode, void onSuccess(T data, V variables)?, void onError(Object error, V variables)?, void onSettled(T? data, Object? error, V variables)?, void onMutate(V variables)?, List<List< ? invalidateQueries, List<Object> >List< ? refetchQueries, Map<Object> >String, dynamic> ? meta}) → MutationOptions<T, V> -
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