EventBus constructor

EventBus({
  1. bool sync = false,
})

Creates an EventBus.

If sync is true, events are passed directly to the stream's listeners during a fire call. If false (the default), the event will be passed to the listeners at a later time, after the code creating the event has completed.

Implementation

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