EventEmitter class
Generic event emitting and handling.
Constructors
- EventEmitter()
- Constructor
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
-
clearListeners(
) → void - This function unbinds all the handlers for all the events.
-
emit(
String event, [dynamic data]) → void -
This function triggers all the handlers currently listening
to
eventand passes themdata. -
hasListeners(
String event) → bool - Returns whether the event has registered.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
off(
String event, [EventHandler? handler]) → void -
This function attempts to unbind the
handlerfrom theevent -
on(
String event, EventHandler handler) → void -
This function binds the
handleras a listener to theevent -
once(
String event, EventHandler handler) → void -
This function binds the
handleras a listener to the first occurrence of theevent. Whenhandleris called once, it is removed. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited