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:

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