qbAttachmentToMap static method

Map<String, Object>? qbAttachmentToMap(
  1. QBAttachment? qbAttachment
)

Implementation

static Map<String, Object>? qbAttachmentToMap(QBAttachment? qbAttachment) {
  if (qbAttachment == null) {
    return null;
  }

  Map<String, Object> map = Map();

  if (qbAttachment.type != null) {
    map["type"] = qbAttachment.type as Object;
  }
  if (qbAttachment.id != null) {
    map["id"] = qbAttachment.id as Object;
  }
  if (qbAttachment.url != null) {
    map["url"] = qbAttachment.url as Object;
  }
  if (qbAttachment.name != null) {
    map["name"] = qbAttachment.name as Object;
  }
  if (qbAttachment.contentType != null) {
    map["contentType"] = qbAttachment.contentType as Object;
  }
  if (qbAttachment.data != null) {
    map["data"] = qbAttachment.data as Object;
  }
  if (qbAttachment.size != null) {
    map["size"] = qbAttachment.size as Object;
  }
  if (qbAttachment.height != null) {
    map["height"] = qbAttachment.height as Object;
  }
  if (qbAttachment.width != null) {
    map["width"] = qbAttachment.width as Object;
  }
  if (qbAttachment.duration != null) {
    map["duration"] = qbAttachment.duration as Object;
  }

  return map;
}