CentralStationRuntime constructor
CentralStationRuntime({
- required Map<
Type, CommandHandler> commandHandlers, - required List<
EventHandler> eventHandlers,
Implementation
CentralStationRuntime({
required this.commandHandlers,
required this.eventHandlers,
}) {
// setup current runtime in event handlers
eventHandlers.forEach((evh) {
evh.runtime = this;
});
// for event dispatching
_eventBus.on().listen((event) {
_dispatch(event);
});
}