ChatContactManager class
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-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
acceptInvitation(
String username) → Future< void> - Accepts a friend invitation。
-
addContact(
String userId, {String? reason}) → Future< void> - Adds a new contact.
-
addEventHandler(
String identifier, ContactEventHandler handler) → void - Adds the contact event handler. After calling this method, you can handle for new contact event when they arrive.
-
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.
-
clearEventHandlers(
) → void - Clear all contact event handlers.
-
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.
-
getEventHandler(
String identifier) → ContactEventHandler? - Get the contact event handler.
-
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 nonexistent method or property is accessed.
inherited
-
removeEventHandler(
String identifier) → void - Remove the contact event handler.
-
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