uploadGroupSharedFile method

Future<void> uploadGroupSharedFile(
  1. String groupId,
  2. String filePath
)

Uploads the shared file to the group.

When a shared file is uploaded, the upload progress callback will be triggered.

Param groupId The group ID.

Param filePath The local path of the shared file.

Throws A description of the exception. See ChatError.

Implementation

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