ChatMultiDeviceEventHandler class
~english The multi-device event handler. Listens for callback for the current user's actions on other devices, including contact changes, group changes, and thread changes.
Adds a multi-device event handler:
ChatClient.getInstance.addMultiDeviceEventHandler((UNIQUE_HANDLER_ID, ChatMultiDeviceEventHandler());
Removes a multi-device event handler:
ChatClient.getInstance.removeMultiDeviceEventHandler(UNIQUE_HANDLER_ID);
~end
~chinese 多设备事件监听 监听当前用户在其他设备上的操作的回调,包括联系人更改、群组和 thread 等更改。
添加监听:
ChatClient.getInstance.addMultiDeviceEventHandler((UNIQUE_HANDLER_ID, ChatMultiDeviceEventHandler());
移除监听:
ChatClient.getInstance.removeMultiDeviceEventHandler(UNIQUE_HANDLER_ID);
~end
Constructors
-
ChatMultiDeviceEventHandler({void onContactEvent(ChatMultiDevicesEvent event, String userId, String? ext)?, void onGroupEvent(ChatMultiDevicesEvent event, String groupId, List<
String> ? userIds)?, void onChatThreadEvent(ChatMultiDevicesEvent event, String chatThreadId, List<String> userIds)?, void onRemoteMessagesRemoved(String conversationId, String deviceId)?, void onConversationEvent(ChatMultiDevicesEvent event, String conversationId, ChatConversationType type)?}) - ~english The multi-device event handler.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onChatThreadEvent
→ (void Function(ChatMultiDevicesEvent event, String chatThreadId, List<
String> userIds)?) -
~english
The multi-device event of thread.
~end
final
- onContactEvent → (void Function(ChatMultiDevicesEvent event, String userId, String? ext)?)
-
~english
The multi-device event of contact.
~end
final
- onConversationEvent → (void Function(ChatMultiDevicesEvent event, String conversationId, ChatConversationType type)?)
-
~english
The multi-device event callback for the operation of a conversation.
~end
final
-
onGroupEvent
→ (void Function(ChatMultiDevicesEvent event, String groupId, List<
String> ? userIds)?) -
~english
The multi-device event of group.
~end
final
- onRemoteMessagesRemoved → (void Function(String conversationId, String deviceId)?)
-
~english
Callback received by other devices after historical messages in a conversation are removed from the server in a multi-device login scenario.
~end
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