MutationSuccess<TData, TError, TVariables> class
final
The mutation completed successfully.
This is an experimental API and may change in a future minor release.
- Inheritance
-
- Object
- MutationSnapshot<
TData, TError, TVariables> - MutationSuccess
Constructors
-
MutationSuccess({required TData data, required TVariables variables, required DateTime? submittedAt, required int failureCount, required TError? failureReason, required bool isPaused, required Mutate<
TVariables> mutate, required MutateAsync<TData, TVariables> mutateAsync, required Reset reset}) -
Creates a success snapshot.
const
Properties
- data → TData
-
The resolved data.
final
- dataOrNull → TData?
-
The resolved data, if the mutation succeeded.
no setteroverride
- failureCount → int
-
The number of times the current mutation has failed.
finalinherited
- failureReason → TError?
-
The error from the most recent failed mutation attempt.
finalinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- isError → bool
-
Whether the mutation is in an error state.
no setterinherited
- isIdle → bool
-
Whether the mutation has not been invoked yet.
no setterinherited
- isPaused → bool
-
Whether the mutation is paused (typically offline).
finalinherited
- isPending → bool
-
Whether the mutation is currently executing.
no setterinherited
- isSuccess → bool
-
Whether the mutation completed successfully.
no setterinherited
-
mutate
→ Mutate<
TVariables> -
A fire-and-forget function that executes the mutation.
finalinherited
-
mutateAsync
→ MutateAsync<
TData, TVariables> -
A function that executes the mutation and returns a Future.
finalinherited
- reset → Reset
-
Resets the mutation to its initial idle state.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- submittedAt → DateTime?
-
The timestamp when the mutation was submitted.
finalinherited
- variables → TVariables
-
The variables passed to the mutation.
final
- variablesOrNull → TVariables?
-
The variables of the most recent mutation, if one has been invoked.
no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override