sendImageMessage method
Future<V2TimValueCallback<V2TimMessage> >
sendImageMessage({
- required String imagePath,
- required String receiver,
- required String groupID,
- int priority = 0,
- bool onlineUserOnly = false,
- bool isExcludedFromUnreadCount = false,
- Map<
String, dynamic> ? offlinePushInfo, - String? fileName,
- Uint8List? fileContent,
override
发送图片消息
web 端发送图片消息时需要传入fileName、fileContent 字段
Implementation
@override
Future<V2TimValueCallback<V2TimMessage>> sendImageMessage(
{required String imagePath,
required String receiver,
required String groupID,
int priority = 0,
bool onlineUserOnly = false,
bool isExcludedFromUnreadCount = false,
Map<String, dynamic>? offlinePushInfo,
String? fileName,
Uint8List? fileContent}) async {
Map<String, dynamic> param = {
"imagePath": imagePath,
"receiver": receiver,
"groupID": groupID,
"priority": priority,
"onlineUserOnly": onlineUserOnly,
"isExcludedFromUnreadCount": isExcludedFromUnreadCount,
"offlinePushInfo": offlinePushInfo,
"fileName": fileName,
"fileContent": fileContent
};
var resp = V2TimValueCallback<V2TimMessage>.fromJson(
formatJson(
await _channel.invokeMethod(
"sendImageMessage",
buildMessageMangerParam(
param,
),
),
),
);
log("sendImageMessage", param, resp.toLogString());
return resp;
}