Observable<T> class
A reactive value that notifies listeners whenever its value changes.
This is the core building block of the reactive system in Minix. Listeners can subscribe to changes and get notified automatically.
- Implementers
Constructors
- Observable.new(T _value)
- Creates a new Observable with the given initial value.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
Gets the current value and tracks the observer if present.
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void - Adds a specific listener to this observable.
-
dispose(
) → void - Disposes the observable by clearing all listeners.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
) → T - Returns the current value without tracking dependency.
-
removeListener(
VoidCallback listener) → void - Removes a specific listener from this observable.
-
toString(
) → String -
A string representation of this object.
inherited
-
watch(
) → T - Returns the current value and tracks the dependency for reactivity.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited