on method

Listener on(
  1. String typeUpdate,
  2. dynamic callback(
    1. dynamic update
    ),
  3. Object? context
)

Implementation

Listener on(String typeUpdate, dynamic Function(dynamic update) callback,
    Object? context) {
  return emitter.on(typeUpdate, context, (ev, context) {
    if (ev.eventData != null) {
      callback(ev.eventData);
      return;
    }
  });
}