downloadThumbnail method
- ChatMessage 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 ChatError. ~end
~chinese 下载消息的缩略图。
Param message
要下载缩略图的消息,一般图片消息和视频消息有缩略图。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。 ~end
Implementation
Future<void> downloadThumbnail(ChatMessage message) async {
Map result = await ChatChannel.invokeMethod(
ChatMethodKeys.downloadThumbnail, {"message": message.toJson()});
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}