Signal class

A signal that can be dispatched to multiple listeners, without returning any data.

Constructors

Signal()

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

add(Function callback) → void
Adds callback to the list of listeners. If it already exists in the list, it will not be added again.
addOnce(Function callback) → void
Adds callback to the list of listeners, but only once. It will be removed from the list after being dispatched once.
dispatch() → void
Dispatches the signal to all registered listeners.
dispatchWithData(dynamic data) → void
Dispatches the signal to all registered listeners, passing data to each listener.
has(Function callback) bool
Returns true if callback is currently in the list of listeners.
hasListeners() bool
Returns true if the signal has any registered listeners.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(Function callback) → void
Removes callback from the list of listeners.
removeAll() → void
Removes all listeners from the signal.
toString() String
A string representation of this object.
inherited

Operators

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