ChatContactEventHandler constructor

ChatContactEventHandler({
  1. void onContactAdded(
    1. String userId
    )?,
  2. void onContactDeleted(
    1. String userId
    )?,
  3. void onContactInvited(
    1. String userId,
    2. String? reason
    )?,
  4. void onFriendRequestAccepted(
    1. String userId
    )?,
  5. void onFriendRequestDeclined(
    1. String userId
    )?,
  6. void onContactSyncStart()?,
  7. void onContactSyncFinish(
    1. ChatError? error
    )?,
  8. void onContactInfoUpdate(
    1. ChatContact contact
    )?,
})

~english The contact updates listener callback.

Param onContactAdded Current user is added as a contact by another user.

Param onContactDeleted Current user is removed from the contact list by another user.

Param onContactInvited Current user receives a friend request.

Param onFriendRequestAccepted A friend request is approved.

Param onFriendRequestDeclined A friend request is declined.

Param onContactSyncStart The SDK starts syncing the contact list from the server.

Param onContactSyncFinish The SDK finishes syncing the contact list from the server.

Param onContactInfoUpdate The information of a contact is updated. ~end

~chinese 联系人事件监听。

Param onContactAdded 添加好友回调。

Param onContactDeleted 删除好友回调。

Param onContactInvited 好友申请回调。

Param onFriendRequestAccepted 发出的好友申请被对方同意。

Param onFriendRequestDeclined 发出的好友申请被对方拒绝。

Param onContactSyncStart 开始从服务器同步联系人列表回调。

Param onContactSyncFinish 从服务器同步联系人列表结束回调。

Param onContactInfoUpdate 联系人信息更新回调。 ~end

Implementation

ChatContactEventHandler({
  this.onContactAdded,
  this.onContactDeleted,
  this.onContactInvited,
  this.onFriendRequestAccepted,
  this.onFriendRequestDeclined,
  this.onContactSyncStart,
  this.onContactSyncFinish,
  this.onContactInfoUpdate,
});