downloadThumbnail method

Future<void> downloadThumbnail(
  1. EMMessage message
)

~english Downloads the thumbnail if the message has not been downloaded before or if the download fails.

Param message The message object.

Throws A description of the exception. See EMError. ~end

~chinese 下载消息的缩略图。

Param message 要下载缩略图的消息,一般图片消息和视频消息有缩略图。

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

Implementation

Future<void> downloadThumbnail(EMMessage message) async {
  Map result = await ChatChannel.invokeMethod(
      ChatMethodKeys.downloadThumbnail, {"message": message.toJson()});
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}