downloadThumbnail method Null safety
- ChatMessage message
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 {@link ChatError}.
Implementation
Future<void> downloadThumbnail(ChatMessage message) async {
Map result = await ChatMethodChannel.ChatManager.invokeMethod(
ChatMethodKeys.downloadThumbnail, {"message": message.toJson()});
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}