downloadThumbImage method

Future<Map> downloadThumbImage (
  1. {@required dynamic target,
  2. @required String messageId}
)

下载缩略图

@param target 聊天对象, JMSingle | JMGroup | JMChatRoom @param messageId 本地数据库中的消息 id,非 serverMessageId

Implementation

Future<Map> downloadThumbImage({
  @required dynamic target,
  @required String messageId,
}) async {
  Map param = target.toJson();
  param['messageId'] = messageId;
  Map resJson = await _channel.invokeMethod('downloadThumbImage', param..removeWhere((key, value) => value == null));

  return {
    'messageId': resJson['messageId'],
    'filePath': resJson['filePath']
  };
}