downloadGroupSharedFile method Null safety

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

Downloads the shared file of the group.

Note: The callback is only used for progress callback.

Param groupId The group ID.

Param fileId The ID of the shared file.

Param savePath The local path of the shared file.

Throws A description of the exception. See {@link EMError}.

Implementation

Future<void> downloadGroupSharedFile(
  String groupId,
  String fileId,
  String savePath,
) async {
  Map req = {'groupId': groupId, 'fileId': fileId, 'savePath': savePath};
  Map result = await _channel.invokeMethod(
      ChatMethodKeys.downloadGroupSharedFile, req);
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}