MutationState<TData, TError> class
Represents the state of a mutation operation.
Constructors
- MutationState({MutationStatus status = MutationStatus.initial, TData? data, TError? error})
-
Creates a new MutationState.
const
Properties
- data → TData?
-
The data returned by a successful mutation.
final
- error → TError?
-
The error thrown by a failed mutation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isError → bool
-
Whether the mutation failed with an error.
no setter
- isInitial → bool
-
Whether the mutation is in its initial state.
no setter
- isLoading → bool
-
Whether the mutation is currently running.
no setter
- isSuccess → bool
-
Whether the mutation completed successfully.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → MutationStatus
-
The current status of the mutation.
final
Methods
-
copyWith(
{MutationStatus? status, TData? data, TError? error, bool clearError = false}) → MutationState< TData, TError> - Creates a copy of this state with the given fields replaced.
-
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