getListenersCount method Null safety

int getListenersCount(
  1. String event
)

Get the list of subscribers for a particular event.

Implementation

int getListenersCount(String event) =>
    _listeners.containsKey(event) ? _listeners[event]!.length : 0;