downloadMessage static method

void downloadMessage({
  1. required String msgID,
  2. required int messageType,
  3. required int imageType,
  4. required bool isSnapshot,
})

Implementation

static void downloadMessage({
  required String msgID,
  required int messageType,
  required int imageType,
  required bool isSnapshot,
}) {
  TencentCloudChat.instance.chatSDKInstance.manager
      .getMessageManager()
      .downloadMessage(
        msgID: msgID,
        messageType: messageType,
        imageType: imageType,
        isSnapshot: isSnapshot,
      )
      .then((value) {
    currentDownloadingList.removeWhere((ele) => ele.getUniqueueKey() == "${msgID}_${imageType}_$isSnapshot");
    if (value.code == 0) {
      console("start download message success ($msgID) ${value.toJson()}");
    } else {
      console("start download message failed ($msgID) ${value.toJson()}");
    }
  });
}