setConversationListener

Introduction

Adding a conversation listener.

Recommended to use this method to add a conversation listener, as setConversationListener method will covering all other listeners added previously.

Parameter details

Parameter name Parameter type Required Platform Description
listener V2TimConversationListener yes All The conversation listener to add.

Returned template

void

Return value details

This function has no return value

Code example

      V2TimConversationListener listener = V2TimConversationListener(
      onConversationChanged: (List<V2TimConversation> conversationList) => {
      },
      onNewConversation: (List<V2TimConversation> conversationList) => {
      },
      onSyncServerFailed: () => {
      },
      onSyncServerFinish: () => {
      },
      onSyncServerStart: () => {
      },
      onTotalUnreadMessageCountChanged: (int totalUnreadCount) => {
      },
    );
    TencentImSDKPlugin.v2TIMManager
        .getConversationManager()
        .setConversationListener(listener: listener);

results matching ""

    No results matching ""