ContactEventHandler class Null safety
The contact event handler.
Occurs when the contact changes, including requests to add friends, notifications to delete friends, requests to accept friends, and requests to reject friends.
Adds a contact event handler:
ChatClient.getInstance.contactManager.addEventHandler(UNIQUE_HANDLER_ID, ContactEventHandler());
Remove a contact event handler:
ChatClient.getInstance.contactManager.removeEventHandler(UNIQUE_HANDLER_ID);
Constructors
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- 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.
read-onlyinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited