Reactive<T> class

A Reactive class that represents a value that can be observed.

The value can be updated, and the change is propagated to its listeners.

Constructors

Reactive(T _value)

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<Snapshot<T>>
Returns a stream of snapshots containing the current and new values.
no setter
value ↔ T
Updates the value and notifies listeners if the value has changed.
getter/setter pair

Methods

addEffect(dynamic effect(Snapshot<T>)) → void
Adds an effect function that gets called whenever the value changes.
dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override