ChatMultiDeviceEventHandler class
多设备事件监听 监听当前用户在其他设备上的操作的回调,包括联系人更改、群组和 thread 等更改。
添加监听:
ChatClient.getInstance.addMultiDeviceEventHandler((UNIQUE_HANDLER_ID, ChatMultiDeviceEventHandler());
移除监听:
ChatClient.getInstance.removeMultiDeviceEventHandler(UNIQUE_HANDLER_ID);
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)?}) - 多设备事件。
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onChatThreadEvent
→ (void Function(ChatMultiDevicesEvent event, String chatThreadId, List<
String> userIds)?) -
多设备 Thread 事件。
final
- onContactEvent → (void Function(ChatMultiDevicesEvent event, String userId, String? ext)?)
-
多设备联系人事件。
final
- onConversationEvent → (void Function(ChatMultiDevicesEvent event, String conversationId, ChatConversationType type)?)
-
开启多设备后单个会话操作的多设备事件回调。
final
-
onGroupEvent
→ (void Function(ChatMultiDevicesEvent event, String groupId, List<
String> ? userIds)?) -
多设备群组事件。
final
- onRemoteMessagesRemoved → (void Function(String conversationId, String deviceId)?)
-
开启多设备后对单个会话删除漫游消息后对其他设备的回调。
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