downloadGroupSharedFile method
~english Downloads group shared files.
Param groupId The group ID.
Param fileId The shared file ID.
Param savePath The local save path of the file.
Returns None.
Throws Exception description, see EMError. ~end
~chinese 下载群共享文件。
Param groupId 群组 ID。
Param fileId 共享文件 ID。
Param savePath 文件本地保存路径。
Return 无。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError. ~end
Implementation
Future<void> downloadGroupSharedFile({
required String groupId,
required String fileId,
required String savePath,
}) async {
try {
Map req = {'groupId': groupId, 'fileId': fileId, 'savePath': savePath};
Map result = await Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.downloadGroupSharedFile, req);
EMError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}