uploadGroupSharedFile method

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

上传群共享文件。

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

Return 无。

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

Implementation

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