setListener static method Null safety

dynamic setListener(
  1. String event,
  2. Function callback
)

Set listener for all action we need to listen of notification.

Implementation

static setListener(String event, Function callback) {
  _listenersMap.addAll({event: callback});
}