MutationState<TData, TVariables, TOptimistic> class
final
Immutable state of one mutation execution.
Constructors
- MutationState({required MutationStatus status, required TData? data, required Object? error, required StackTrace? errorStackTrace, required int failureCount, required Object? failureReason, required bool isPaused, required TVariables? variables, required TOptimistic? optimistic, required DateTime? submittedAt})
-
Creates a complete immutable mutation state.
const
- MutationState.idle()
-
Creates the state before a mutation runs.
factory
Properties
- data → TData?
-
The successful result, when available.
final
- error → Object?
-
The terminal or latest retry error.
final
- errorStackTrace → StackTrace?
-
The stack trace associated with error.
final
- failureCount → int
-
The number of consecutive failures.
final
- failureReason → Object?
-
The latest failure that may still be retried.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isError → bool
-
Whether the mutation failed.
no setter
- isIdle → bool
-
Whether the mutation has not started.
no setter
- isPaused → bool
-
Whether execution is waiting for connectivity.
final
- isPending → bool
-
Whether the mutation is running or paused.
no setter
- isSuccess → bool
-
Whether the mutation succeeded.
no setter
- optimistic → TOptimistic?
-
The optimistic value returned before execution.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → MutationStatus
-
The mutation lifecycle status.
final
- submittedAt → DateTime?
-
When the current execution was submitted.
final
- variables → TVariables?
-
The variables passed to the current execution.
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