downloadAttachment method

Future<NIMResult<void>> downloadAttachment(
  1. {required NIMMessage message,
  2. required bool thumb}
)

正常情况收到消息后附件会自动下载。如果下载失败,可调用该接口重新下载 message 附件所在的消息, thumb 下载缩略图还是原文件, 为true时仅下载缩略图。 缩略图参数仅对图片和视频类消息有效

Implementation

Future<NIMResult<void>> downloadAttachment(
    {required NIMMessage message, required bool thumb}) async {
  return _platform.downloadAttachment(message: message, thumb: thumb);
}