AtomAction1<A> class
sealed
An Atom can only be modified within an AtomAction.
This ensures that the state is changed in a safe and predictable manner,
allowing state observation.
There are several variations of AtomAction that accept arguments:
- AtomAction: ()
- AtomAction1: (arg1)
- AtomAction2: (arg1, arg2)
- AtomAction3: (arg1, arg2, arg3)
Example:
final counterState = atom(0);
final counterAction = atomAction((set) {
set(counterState, 1);
});
counterAction();
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
A arg1) → FutureOr - Executes the action
-
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