downloadThumbnail method

Future<void> downloadThumbnail(
  1. 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 ChatError.

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;
  }
}