EventManager class
Publish events through the mediator to be handled by multiple handlers.
Constructors
-
EventManager({required EventHandlerStore eventHandlerStore, required List<
EventObserver> observers, required DispatchStrategy defaultDispatchStrategy}) - Creates a new EventManager.
-
EventManager.create({List<
EventObserver> observers = const [], DispatchStrategy defaultDispatchStrategy = const DispatchStrategy.concurrent()}) -
Creates a default EventManager.
factory
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
-
dispatch<
TEvent extends DomainEvent> (TEvent event, [DispatchStrategy? dispatchStrategy]) → Future< void> -
Dispatches the given
event
to the registered EventHandler's. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on<
T extends DomainEvent> () → EventSubscriptionBuilder< T> -
Subscribe on the given
T
event. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited