EventDispatcher class

The controller through which all events communicate with each other.

Constructors

EventDispatcher({int defaultPriority = 10, int dispatcherId})
Creates a new Event Dispatcher. [...]

Properties

defaultPriority int
Default Event Handler Priority
final
dispatcherId int
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
post<T>(T event, {bool postDeadEvent = true}) bool
Fires an event to registered listeners. Any listeners that take the specific type event will be called. [...]
register<T>(EventHandlerFunction<T> handler, {EventFilter filter = _defaultFilter, int priority, bool always = false}) bool
Registers a method so that it can start receiving events. [...]
registerHandlers(Object object) bool
Scans the object for Subscribe annotations and registers handlers appropriately.
toString() String
A string representation of this object. [...]
inherited
unregister<T>(EventHandlerFunction<T> handler, {EventFilter filter = _defaultFilter, int priority}) bool
Unregisters a handler from receiving events. If the specific handler has a filter, it should be provided in order to properly unregister the listener. If the specific handler has a priority, it should be provided as well. Returns whether the handler was removed or not.
unregisterHandlers(Object object) bool
Unregisters all handlers that were registered on object.

Operators

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