ReadonlyReacton<T> class
A read-only reacton that derives its value from other reactons.
The value is automatically recomputed when any dependency changes. Created via the top-level computed() factory function.
final doubleCountReacton = computed(
(read) => read(counterReacton) * 2,
name: 'doubleCount',
);
- Inheritance
-
- Object
- ReactonBase<
T> - ReadonlyReacton
- Implementers
Constructors
-
ReadonlyReacton(T compute(ReactonReader read), {String? name, ReactonOptions<
T> ? options})
Properties
- compute → T Function(ReactonReader read)
-
The computation function that derives this reacton's value.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
options
→ ReactonOptions<
T> ? -
Configuration options.
finalinherited
- ref → ReactonRef
-
Unique identity of this reacton.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
equals(
T a, T b) → bool -
Whether values are considered equal (prevents unnecessary propagation).
inherited
-
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