EventDispatcher class

The controller through which all events communicate with each other.


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


defaultPriority int
Default Event Handler Priority
dispatcherId int
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


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
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. [...]
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.


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