Action class
Actions that are send to the Dispatcher and executed which causes mutation on the specified store's state
Constructors
-
Action(Stream<
Mutation> body(), {void onDone()?, List<Mutation> ? onError(Object error)?, List<ActionId> waitFor = const []}) -
Action.single(Store store, dynamic type, {void onDone()?, List<
Mutation> ? onError(Object error)?, List<ActionId> waitFor = const []}) -
Quickly creates and executes a single mutatiton
factory
Properties
-
body
→ Stream<
Mutation> Function() -
You perform any async actions that are required for a mutation and yield the mutation
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → ActionId
-
A unique id that represents a specific instance of an action
no setter
- onDone → (void Function()?)
-
Executed when the action has been successfully executed
final
-
onError
→ (List<
Mutation> ? Function(Object error)?) -
A list of fallback mutations you want to send to as Error events
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
waitFor
→ List<
ActionId> -
A list actions that you want to wait for them to be executed successfully before executing this action.
If anyone of the action fails in then the action will not execute
final
Methods
-
clear(
ActionId id) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited