addListener static method

Callback addListener(
  1. String event,
  2. Callback call
)

Implementation

static Callback addListener(String event, Callback call) {
  var callList = _eventMap[event];
  if (callList == null) {
    callList = [];
    _eventMap[event] = callList;
  }

  callList.add(call);

  return call;
}