Observer<T extends Subject> class

The Observer class can subscribe to one or more Subject instances. It uses its argument handler Function in its receive(subject) method in order to handle any notifications.

Constructors

Observer({required ObserverHandler<T> handler})
Construct an Observer with a handler for any notifying Subject.

Properties

handler ObserverHandler<T>
Handles Subject notifications.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
receive(covariant T subject) → void
Calls handler and passes the notifying Subject.
toString() String
A string representation of this object.
inherited

Operators

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