MutationObserver<TData, TVariables, TOptimistic> class
final
Reactive facade that tracks the latest execution of one mutation kind.
Constructors
-
MutationObserver(QueryClient client, MutationOptions<
TData, TVariables, TOptimistic> options) -
Creates an observer for
optionsonclient.
Properties
- client → QueryClient
-
The client used to execute mutations.
final
-
current
→ MutationState<
TData, TVariables, TOptimistic> -
The latest mutation state.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
options
↔ MutationOptions<
TData, TVariables, TOptimistic> -
The mutation definition used for the next execution.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Releases subscriptions held by this observer.
-
mutate(
TVariables variables) → Future< TData> -
Starts the mutation with
variables. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Detaches the current execution and restores idle state.
-
setOptions(
MutationOptions< TData, TVariables, TOptimistic> options) → void -
Uses
optionsfor future executions without detaching the active one. -
subscribe(
void listener(MutationState< TData, TVariables, TOptimistic> state)) → QueryDispose - Subscribes to mutation state changes and emits the current state.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited