subscribeChatEvent method

Future<StreamSubscription> subscribeChatEvent(
  1. String eventName,
  2. dynamic eventMethod, {
  3. dynamic onErrorMethod,
})

Implementation

Future<StreamSubscription<dynamic>> subscribeChatEvent(String eventName, eventMethod, {onErrorMethod}) async {
  return EventChannel(eventName).receiveBroadcastStream(eventName).listen(eventMethod, onError: onErrorMethod);
}