add method

  1. @mustCallSuper
void add(
  1. TEvent event
)

Adds the event to the events queue.

Implementation

@mustCallSuper
void add(TEvent event) {
  _eventsQueue.add(event);
  while (_commandsQueue.isNotEmpty) {
    if (_commandsQueue.first.handle(_eventsQueue)) {
      _commandsQueue.removeFirst();
    } else {
      return;
    }
  }
}