Mutation<Params, Data, Err> class sealed

Properties

encodedKey String
no setterinherited
hasGcTimer bool
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListener bool
no setterinherited
key FueryKey
no setterinherited
options MutationOptions<Params, Data, Err>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream → ValueStream<MutationState<Data, Err>>
Returns stream of state and Assign BehaviorSubject if not exists.
no setterinherited

Methods

cancelGcTimer() → void
Cancel timer if timer exists.
inherited
emit(MutationState<Data, Err> state) → void
Updates the state to the provided state.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setGcTimer({required int gcTime, required void callback()}) → void
Set timer if timer is null.
inherited
setParams(Params params) → void
Updates params to the provided params.
inherited
sleep() Future<void>
Close BehaviorSubject and start the garbage collector timer.
inherited
toString() String
A string representation of this object.
inherited
wake() → void
Assign a BehaviorSubject, indicating that listeners can subscribe to it.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

noParam<Data, Err>({required MutationNoParamAsyncFn<Data, Err> mutationFn, MutationKey? mutationKey, int? gcTime, MutationNoParamMutateCallback? onMutate, MutationNoParamSuccessCallback<Data>? onSuccess, MutationNoParamErrorCallback<Err>? onError}) MutationResult<Data, Err, MutationNoParamSyncFn, MutationNoParamAsyncFn<Data, Err>>
returns MutationResult by new or existing Mutation. If there is no existing Mutation with the same mutationKey, it creates a new Mutation instance.
use<Params, Data, Err>({required MutationAsyncFn<Params, Data, Err> mutationFn, MutationKey? mutationKey, int? gcTime, MutationMutateCallback<Params>? onMutate, MutationSuccessCallback<Params, Data>? onSuccess, MutationErrorCallback<Params, Err>? onError}) MutationResult<Data, Err, MutationSyncFn<Params, Data, Err>, MutationAsyncFn<Params, Data, Err>>
Returns MutationResult new or existing Mutation. If there is no existing Mutation with the same mutationKey, it creates a new Mutation instance.