uploadGroupSharedFile method

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

~english Uploads group shared files.

Param groupId The group ID. Param filePath The local path of the file to upload.

Returns None.

Throws Exception description, see EMError. ~end

~chinese 上传群共享文件。

Param groupId 群组 ID。 Param filePath 要上传的文件本地路径。

Return 无。

Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError. ~end

Implementation

Future<void> uploadGroupSharedFile(
  String groupId,
  String filePath,
) async {
  try {
    Map req = {'groupId': groupId, 'filePath': filePath};
    Map result = await Client.instance.groupManager
        .callNativeMethod(ChatMethodKeys.uploadGroupSharedFile, req);
    EMError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}