addEventHandler method

void addEventHandler(
  1. String identifier,
  2. ChatEventHandler handler
)

Adds the chat event handler. After calling this method, you can handle for chat event when they arrive.

Param identifier The custom handler identifier, is used to find the corresponding handler.

Param handler The handler for chat event. See ChatEventHandler.

Implementation

void addEventHandler(
  String identifier,
  ChatEventHandler handler,
) {
  _eventHandlesMap[identifier] = handler;
}