ChatContactEventHandler class

联系人事件监听

添加监听:

  ChatClient.getInstance.contactManager.addEventHandler(UNIQUE_HANDLER_ID, ChatContactEventHandler());

移除监听:

  ChatClient.getInstance.contactManager.removeEventHandler(UNIQUE_HANDLER_ID);

Constructors

ChatContactEventHandler({void onContactAdded(String userId)?, void onContactDeleted(String userId)?, void onContactInvited(String userId, String? reason)?, void onFriendRequestAccepted(String userId)?, void onFriendRequestDeclined(String userId)?, void onContactSyncStart()?, void onContactSyncFinish(ChatError? error)?, void onContactInfoUpdate(ChatContact contact)?})
联系人事件监听。

Properties

hashCode int
The hash code for this object.
no setterinherited
onContactAdded → void Function(String userId)?
添加好友回调。
final
onContactDeleted → void Function(String userId)?
删除好友回调。
final
onContactInfoUpdate → void Function(ChatContact contact)?
联系人信息更新时触发的回调。
final
onContactInvited → void Function(String userId, String? reason)?
好友申请回调。
final
onContactSyncFinish → void Function(ChatError? error)?
SDK 从服务器同步联系人列表结束时触发的回调。
final
onContactSyncStart → void Function()?
SDK 开始从服务器同步联系人列表时触发的回调。
final
onFriendRequestAccepted → void Function(String userId)?
发出的好友申请被对方同意。
final
onFriendRequestDeclined → void Function(String userId)?
发出的好友申请被对方拒绝。
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited