EMContactEventHandler class

联系人事件监听

添加监听:

  EMClient.getInstance.contactManager.addEventHandler(UNIQUE_HANDLER_ID, EMContactEventHandler());

移除监听:

  EMClient.getInstance.contactManager.removeEventHandler(UNIQUE_HANDLER_ID);

Constructors

EMContactEventHandler({void onContactAdded(String userId)?, void onContactDeleted(String userId)?, void onContactInvited(String userId, String? reason)?, void onFriendRequestAccepted(String userId)?, void onFriendRequestDeclined(String userId)?})
联系人事件监听。

Properties

hashCode int
The hash code for this object.
read-onlyinherited
onContactAdded → (void Function(String userId)?)
添加好友回调。
final
onContactDeleted → (void Function(String userId)?)
删除好友回调。
final
onContactInvited → (void Function(String userId, String? reason)?)
好友申请回调。
final
onFriendRequestAccepted → (void Function(String userId)?)
发出的好友申请被对方同意。
final
onFriendRequestDeclined → (void Function(String userId)?)
发出的好友申请被对方拒绝。
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

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