EMChatManager constructor

EMChatManager()

Implementation

EMChatManager() {
  ChatChannel.setMethodCallHandler((MethodCall call) async {
    if (call.method == ChatMethodKeys.onMessagesReceived) {
      return _onMessagesReceived(call.arguments);
    } else if (call.method == ChatMethodKeys.onCmdMessagesReceived) {
      return _onCmdMessagesReceived(call.arguments);
    } else if (call.method == ChatMethodKeys.onMessagesRead) {
      return _onMessagesRead(call.arguments);
    } else if (call.method == ChatMethodKeys.onGroupMessageRead) {
      return _onGroupMessageRead(call.arguments);
    } else if (call.method ==
        ChatMethodKeys.onReadAckForGroupMessageUpdated) {
      return _onReadAckForGroupMessageUpdated(call.arguments);
    } else if (call.method == ChatMethodKeys.onMessagesDelivered) {
      return _onMessagesDelivered(call.arguments);
    } else if (call.method == ChatMethodKeys.onMessagesRecalled) {
      return _onMessagesRecalled(call.arguments);
    } else if (call.method == ChatMethodKeys.onConversationUpdate) {
      return _onConversationsUpdate(call.arguments);
    } else if (call.method == ChatMethodKeys.onConversationHasRead) {
      return _onConversationHasRead(call.arguments);
    } else if (call.method == ChatMethodKeys.onMessageReactionDidChange) {
      return _messageReactionDidChange(call.arguments);
    } else if (call.method == ChatMethodKeys.onMessageContentChanged) {
      return _onMessageContentChanged(call.arguments);
    } else if (call.method == ChatMethodKeys.onMessagePinChanged) {
      return _onMessagePinChanged(call.arguments);
    } else if (call.method == ChatMethodKeys.onMessagesRecalledInfo) {
      return _onMessagesRecalledInfo(call.arguments);
    }
    return null;
  });
}