downloadGroupSharedFile method
下载群共享文件。
Param groupId 群组 ID。
Param fileId 共享文件 ID。
Param savePath 文件本地保存路径。
Return 无。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError.
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 platform_interface.Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.downloadGroupSharedFile, req);
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}