SelectorReacton<T, S> class
A selector reacton that watches a sub-value of another reacton.
Only triggers rebuilds when the selected sub-value actually changes, providing fine-grained reactivity for complex state objects.
final userNameReacton = selector(
userReacton,
(user) => user.name,
name: 'userName',
);
- Inheritance
-
- Object
- ReactonBase<
S> - ReadonlyReacton<
S> - SelectorReacton
Constructors
-
SelectorReacton(ReactonBase<
T> source, S select(T), {String? name, ReactonOptions<S> ? options})
Properties
- compute → S Function(ReactonReader read)
-
The computation function that derives this reacton's value.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
options
→ ReactonOptions<
S> ? -
Configuration options.
finalinherited
- ref → ReactonRef
-
Unique identity of this reacton.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- select → S Function(T)
-
The selector function that extracts the sub-value.
final
-
source
→ ReactonBase<
T> -
The source reacton being selected from.
final
Methods
-
equals(
S a, S 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