Listenable class abstract

An object that maintains a list of listeners.

The listeners are typically used to notify clients that the object has been updated.

The terms "notify clients", "send notifications", "trigger notifications", and "fire notifications" are used interchangeably.

See also:

Constructors

Listenable()
This constructor enables subclasses to provide const constructors so that they can be used in const expressions.
const
Listenable.merge(Iterable<Listenable?> listenables)
Return a Listenable that triggers when any of the given Listenables themselves trigger.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object notifies its listeners.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

debugMaybeDispatchCreated ↔ ObjectCreatedCallback
Called when a new object is created.
getter/setter pair
debugMaybeDispatchDisposed ↔ ObjectDisposedCallback
Called when an object is disposed.
getter/setter pair
onError ↔ ErrorCallback
Error callback that is called when an error is thrown by a listener or assertion.
getter/setter pair