sendFileMessage method
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,
- Map<
String, dynamic> ? offlinePushInfo, - Uint8List? fileContent,
override
发送文件 web 端 fileName、fileContent 为必传字段
Implementation
@override
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,
Map<String, dynamic>? offlinePushInfo,
Uint8List? fileContent}) async {
Map<String, dynamic> param = {
"filePath": filePath,
"fileName": fileName,
"receiver": receiver,
"groupID": groupID,
"priority": priority,
"onlineUserOnly": onlineUserOnly,
"isExcludedFromUnreadCount": isExcludedFromUnreadCount,
"offlinePushInfo": offlinePushInfo,
"fileContent": fileContent
};
var resp = V2TimValueCallback<V2TimMessage>.fromJson(
formatJson(
await _channel.invokeMethod(
"sendFileMessage",
buildMessageMangerParam(
param,
),
),
),
);
log("sendFileMessage", param, resp.toLogString());
return resp;
}