ChatContactEventHandler class

The contact event handler.

Occurs when the contact changes, including adding or deleting contacts and accept or rejecting friend requests.

Adds a contact event handler:

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

Removes a contact event handler:

  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)?})
The contact updates listener callback.

Properties

hashCode int
The hash code for this object.
no setterinherited
onContactAdded → void Function(String userId)?
Occurs when user is added as a contact by another user.
final
onContactDeleted → void Function(String userId)?
Occurs when a user is removed from the contact list by another user.
final
onContactInvited → void Function(String userId, String? reason)?
Occurs when a user receives a friend request.
final
onFriendRequestAccepted → void Function(String userId)?
Occurs when a friend request is approved.
final
onFriendRequestDeclined → void Function(String userId)?
Occurs when a friend request is declined.
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