downloadThumbnail method
- 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 {
try {
Map result = await Client.instance.chatManager.callNativeMethod(
ChatMethodKeys.downloadThumbnail, {"message": message.toJson()});
EMError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}