Mediator constructor

Mediator({
  1. required EventManager eventManager,
  2. required RequestManager requestManager,
})

Creates a new Mediator

eventManager can be provided to manage event publishing.

requestManager can be provided to manage request/response communication.

Implementation

Mediator({
  required EventManager eventManager,
  required RequestManager requestManager,
})  : _eventManager = eventManager,
      _requestsManager = requestManager;