MutationOptions<T, V> class
final
Lifecycle callbacks run even after the initiating component unmounts, so cache invalidation completes. Keep UI-only effects outside these callbacks.
Constructors
-
MutationOptions({required Future<
T> mutationFn(V variables, MutationContext context), Duration timeout = const Duration(seconds: 30), FutureOr<Object?> onMutate(V variables)?, FutureOr<void> onSuccess(T data, V variables, Object? context)?, FutureOr<void> onError(Object error, V variables, Object? context)?, FutureOr<void> onSettled(T? data, Object? error, V variables, Object? context)?}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
mutationFn
→ Future<
T> Function(V variables, MutationContext context) -
final
-
onError
→ FutureOr<
void> Function(Object error, V variables, Object? context)? -
final
-
onMutate
→ FutureOr<
Object?> Function(V variables)? -
final
-
onSettled
→ FutureOr<
void> Function(T? data, Object? error, V variables, Object? context)? -
final
-
onSuccess
→ FutureOr<
void> Function(T data, V variables, Object? context)? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration
-
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