setXHS method

void setXHS({
  1. String? title,
  2. String? desc,
  3. String? text,
  4. dynamic images,
  5. dynamic videos,
  6. String? url,
  7. SSDKContentType? contentType,
})

Implementation

void setXHS(
    {String? title,
    String? desc,
    String? text,
    dynamic images,
    dynamic videos,
    String? url,
    SSDKContentType? contentType}) {
  Map params = {};
  if (title != null) {
    map[kTitle] = title;
    params[kTitle] = title;
  }
  if (desc != null) {
    params[kDesc] = kDesc;
  }
  if (text != null) {
    map[kText] = text;
  }
  if (url != null) {
    map[kUrl] = url;
  }
  if (images != null) {
    map[kImages] = images;
  }
  if (videos != null) {
    map[kVideo] = videos;
  }
  if (contentType != null) {
    map[kType] = contentType.value;
  }

  int? id = ShareSDKPlatforms.xhs.id;
  map["@platform($id)"] = params;
}