V2TIMMessageManager class Null safety Manager

提供高级消息处理相关接口

addAdvancedMsgListener 添加高级消息的事件监听器

removeAdvancedMsgListener 移除高级消息监听器

sendCustomMessage 创建自定义消息

sendImageMessage 创建图片消息(图片最大支持 28 MB)

sendSoundMessage 创建语音消息(语音最大支持 28 MB)

sendVideoMessage 创建视频消息(视频最大支持 100 MB)

sendVideoMessage 创建文件消息(文件最大支持 100 MB)

getC2CHistoryMessageList 获取单聊历史消息

getGroupHistoryMessageList 获取群组历史消息

getHistoryMessageList 获取历史消息高级接口

revokeMessage 撤回消息

markC2CMessageAsRead 设置单聊消息已读

markGroupMessageAsRead 设置群组消息已读

deleteMessageFromLocalStorage 删除本地消息

deleteMessages 删除本地及漫游消息

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

addAdvancedMsgListener({required V2TimAdvancedMsgListener listener}) → void
添加高级消息的事件监听器
deleteMessageFromLocalStorage({required String msgID}) Future<V2TimCallback>
删除本地消息 [...]
deleteMessages({required List<String> msgIDs}) Future<V2TimCallback>
删除本地及漫游消息 [...]
getC2CHistoryMessageList({required String userID, required int count, String? lastMsgID}) Future<V2TimValueCallback<List<V2TimMessage>>>
获取单聊历史消息 [...]
getC2CReceiveMessageOpt({required List<String> userIDList}) Future<V2TimValueCallback<List<V2TimReceiveMessageOptInfo>>>
查询针对某个用户的 C2C 消息接收选项
getGroupHistoryMessageList({required String groupID, required int count, String? lastMsgID}) Future<V2TimValueCallback<List<V2TimMessage>>>
获取群组历史消息 [...]
getHistoryMessageList({int getType = HistoryMessageGetType.V2TIM_GET_LOCAL_OLDER_MSG, String? userID, String? groupID, int lastMsgSeq = -1, required int count, String? lastMsgID}) Future<V2TimValueCallback<List<V2TimMessage>>>
获取历史消息高级接口 [...]
getHistoryMessageListWithoutFormat({int getType = HistoryMessageGetType.V2TIM_GET_LOCAL_OLDER_MSG, String? userID, String? groupID, int lastMsgSeq = -1, required int count, String? lastMsgID}) Future<LinkedHashMap>
获取历史消息高级接口(没有处理Native返回数据) [...]
insertC2CMessageToLocalStorage({required String data, required String userID, required String sender}) Future<V2TimValueCallback<V2TimMessage>>
向C2C消息列表中添加一条消息 [...]
insertGroupMessageToLocalStorage({required String data, required String groupID, required String sender}) Future<V2TimValueCallback<V2TimMessage>>
向群组消息列表中添加一条消息 [...]
markC2CMessageAsRead({required String userID}) Future<V2TimCallback>
设置单聊消息已读
markGroupMessageAsRead({required String groupID}) Future<V2TimCallback>
设置群组消息已读
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
removeAdvancedMsgListener() → void
移除高级消息监听器
reSendMessage({required String msgID, bool onlineUserOnly = false}) Future<V2TimValueCallback<V2TimMessage>>
消息重发
revokeMessage({required String msgID}) Future<V2TimCallback>
撤回消息 [...]
sendCustomMessage({required String data, required String receiver, required String groupID, int priority = 0, String desc = "", String extension = "", bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
发送自定义消息
sendFaceMessage({required int index, required String data, required String receiver, required String groupID, int priority = 0, bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
创建表情消息 [...]
sendFileMessage({required String filePath, required String fileName, required String receiver, required String groupID, int priority = 0, bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
发送文件
sendForwardMessage({required String msgID, required String receiver, required String groupID, int priority = 0, bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
转发消息 [...]
sendImageMessage({required String imagePath, required String receiver, required String groupID, int priority = 0, bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
发送图片消息
sendLocationMessage({required String desc, required double longitude, required double latitude, required String receiver, required String groupID, int priority = 0, bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
发送地理位置消息
sendMergerMessage({required List<String> msgIDList, required String title, required List<String> abstractList, required String compatibleText, required String receiver, required String groupID, int priority = 0, bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
合并消息 [...]
sendSoundMessage({required String soundPath, required String receiver, required String groupID, required int duration, int priority = 0, bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
发送语音消息
sendTextAtMessage({required String text, required List<String> atUserList, required String receiver, required String groupID, int priority = 0, bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
创建文本消息,并且可以附带 @ 提醒功能 [...]
sendTextMessage({required String text, required String receiver, required String groupID, int priority = 0, bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
发送自定义消息
sendVideoMessage({required String videoFilePath, required String receiver, required String type, required String snapshotPath, required int duration, required String groupID, int priority = 0, bool onlineUserOnly = false, bool isExcludedFromUnreadCount = false, OfflinePushInfo? offlinePushInfo}) Future<V2TimValueCallback<V2TimMessage>>
发送视频消息
setC2CReceiveMessageOpt({required List<String> userIDList, required int opt}) Future<V2TimCallback>
设置用户消息接收选项 [...]
setCloudCustomData({required String data, required String msgID}) Future<V2TimCallback>
设置云端自定义数据(云端保存,会发送到对端,程序卸载重装后还能拉取到)
setGroupReceiveMessageOpt({required String groupID, required int opt}) Future<V2TimCallback>
修改群消息接收选项 [...]
setLocalCustomData({required String msgID, required String localCustomData}) Future<V2TimCallback>
设置消息自定义数据(本地保存,不会发送到对端,程序卸载重装后失效)
setLocalCustomInt({required String msgID, required int localCustomInt}) Future<V2TimCallback>
设置消息自定义数据,可以用来标记语音、视频消息是否已经播放(本地保存,不会发送到对端,程序卸载重装后失效)
toString() String
A string representation of this object. [...]
inherited

Operators

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