EventDispatcher class
The Event Dispatcher.
Manages the registration and dispatching of events to listeners.
This is the engine behind the Event facade.
It supports mapping an Event Type to multiple Listener factories.
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
-
clear(
) → void - Clear all listeners.
-
dispatch(
MagicEvent event) → Future< void> - Dispatch an event to all registered listeners.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
Type eventType, List< MagicListener< listeners) → voidMagicEvent> Function()> - Register valid listeners for a specific event.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → EventDispatcher
-
no setter