ObservableComposite<T> class

Merges multiple updates of ObserveAwares and emits a single update notification stream.

Inheritance

Constructors

ObservableComposite({bool coalesce = false, List<ObserveAware>? values, bool withStackTrace = false})
Changes are published synchronously by default. When coalesce is set, the changes in the current execution block are collected, and only the one event with null value will be published (in an async scheduled microtask).

Properties

changes Stream<Change<T?>>
Provides a stream of change pairs.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListener bool
Whether there is a subscriber to stream or changes.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<T?>
Provides a stream of object values when the reference changes.
no setterinherited

Methods

dispose() → void
Disposes this disposable and any resources it has open.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyChange([T? previous, T? next]) → void
Notifies the streams about a new value (or forces the notification without equality check).
inherited
register(ObserveAware? value, {ObserveAware? replaces, bool initialNotification = true}) ObserveAware?
Starts listening on value changes (if not already doing so).
registerStream(Stream stream, {Stream? replaces, bool initialNotification = true}) Stream
Starts listening on value changes (if not already doing so).
toString() String
A string representation of this object.
inherited
unregister(ObserveAware? value) → void
Stops listening on value changes.
unregisterStream(Stream? stream) → void
Stops listening on stream events.

Operators

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