eventBus property Null safety

EventBus eventBus

Allows to listens for events

If no event bus is specified in the constructor, an aysnchronous bus is used. Usage:

eventBus.on<SmtpConnectionLostEvent>().listen((event) {
  // All events are of type SmtpConnectionLostEvent (or subtypes of it).

eventBus.on<SmtpEvent>().listen((event) {
  // All events are of type SmtpEvent (or subtypes of it).


EventBus get eventBus => _eventBus;