downloadGroupSharedFile method

Future<void> downloadGroupSharedFile({
  1. required String groupId,
  2. required String fileId,
  3. required String savePath,
})

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 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;
  }
}