EventManager constructor
EventManager({
- required EventHandlerStore eventHandlerStore,
- required List<
EventObserver> observers, - required DispatchStrategy defaultDispatchStrategy,
Creates a new EventManager.
eventHandlerStore
is used to store the subscribed EventHandler's.
These handlers are created by the on method.
observers
can be provided to observe events dispatched.
defaultDispatchStrategy
defines the strategy used when dispatching
events. By default DispatchStrategy.concurrent is used.
Implementation
EventManager({
required EventHandlerStore eventHandlerStore,
required List<EventObserver> observers,
required DispatchStrategy defaultDispatchStrategy,
}) : _eventHandlerStore = eventHandlerStore,
_observers = observers,
_defaultDispatchStrategy = defaultDispatchStrategy;