Atom<T> class
abstract
The base class for all atoms.
An atom is a special identifiet, that points to some state in an AtomRegistry.
It also contains configuration that determines how its state is read, or written (see WritableAtom).
- Implementers
- Available Extensions
Constructors
- Atom()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String?
-
Debug name for this atom
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldKeepAlive → bool
-
Should this atoms state be kept, even if it isnt being used?
no setter
Methods
-
$lifetime(
Node node) → ReadLifetime< T> - Used by the registry to create a read lifetime. Bit hacky, but allows us to go from dynamic to T.
-
$read(
AtomContext< T> ctx) → T - Used by the registry to read the atoms value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
withInitialValue(
T value, {bool keepAlive = true}) → AtomInitialValue< T> -
Create an initial value override, which can be given to an
AtomScope
or AtomRegistry.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited