EventBus constructor

EventBus(
  1. {bool sync: false}
)

Create an event bus with default dart StreamController. You can use sync to indentify whether the event bus should be sync or async, by default it is async. For more detail, check Stream document.

Implementation

EventBus({bool sync = false})
    : _streamController = StreamController.broadcast(sync: sync);