removeConversationListener

Introduction

Remove a specific conversation listener.

  1. It will remove all the conversation listeners if do not provide any specific conversation listener.

Parameter details

Parameter name Parameter type Required Platform Description
listener V2TimConversationListener no All The conversation listener to remove.

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()
        .addConversationListener(listener: listener);
    TencentImSDKPlugin.v2TIMManager
        .getConversationManager()
        .removeConversationListener(listener: listener);

results matching ""

    No results matching ""