MutationResult<T, V> class

Result object for useMutation hook

Constructors

MutationResult({T? data, Object? error, required bool isLoading, required bool isSuccess, required bool isError, required bool isIdle, required Future<T> mutate(V variables), required void mutateAsync(V variables), required void reset()})
const
MutationResult.fromState(MutationState<T> state, {required Future<T> mutate(V variables), required void mutateAsync(V variables), required void reset()})
Create MutationResult from MutationState
factory

Properties

data → T?
Current mutation data
final
error Object?
Current error if any
final
hashCode int
The hash code for this object.
no setterinherited
isError bool
Whether the mutation has an error
final
isIdle bool
Whether the mutation is idle
final
isLoading bool
Whether the mutation is currently loading
final
isSuccess bool
Whether the mutation was successful
final
mutate Future<T> Function(V variables)
Function to execute the mutation
final
mutateAsync → void Function(V variables)
Function to execute the mutation asynchronously (fire and forget)
final
reset → void Function()
Function to reset mutation state
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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