EMContactManager class Null safety

The contact manager class, which manages chat contacts such as adding, deleting, retrieving, and modifying contacts.

Properties

hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

acceptInvitation(String username) Future<void>
Accepts a friend invitation。
addContact(String userId, {String? reason}) Future<void>
Adds a new contact.
addContactListener(EMContactManagerListener listener) → void
Registers a new contact listener.
@Deprecated("Use - addContactManagerListener")
addContactManagerListener(EMContactManagerListener listener) → void
Registers a new contact manager listener.
addUserToBlockList(String username) Future<void>
Adds a user to the block list. You can send messages to the users on the block list, but cannot receive messages from them.
clearContactManagerListeners() → void
Removes all contact manager listeners.
declineInvitation(String username) Future<void>
Declines a friend invitation.
deleteContact(String username, {bool keepConversation = false}) Future<void>
Deletes a contact and all the related conversations.
getAllContactsFromDB() Future<List<String>>
Gets the contact list from the local database.
getAllContactsFromServer() Future<List<String>>
Gets all the contacts from the server.
getBlockListFromDB() Future<List<String>>
Gets the block list from the local database.
getBlockListFromServer() Future<List<String>>
Gets the block list from the server.
getSelfIdsOnOtherPlatform() Future<List<String>>
Gets the unique IDs of the current user on the other devices. The ID is in the format of username + "/" + resource.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
removeContactListener(EMContactManagerListener contactListener) → void
Removes the contact listener.
@Deprecated("Use - removeContactManagerListener")
removeContactManagerListener(EMContactManagerListener listener) → void
Removes the contact manager listener.
removeUserFromBlockList(String username) Future<void>
Removes the contact from the block list.
toString() String
A string representation of this object.
inherited

Operators

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