on method

Stream<Event> on([
  1. String? eventType,
  2. String? eventType2,
  3. String? eventType3,
  4. String? eventType4,
])

Stream of Event coming from websocket connection specific for the channel. Pass an eventType as parameter in order to filter just a type of event.

Implementation

Stream<Event> on([
  String? eventType,
  String? eventType2,
  String? eventType3,
  String? eventType4,
]) =>
    _client
        .on(
          eventType,
          eventType2,
          eventType3,
          eventType4,
        )
        .where((e) => e.cid == cid);