toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  if (files != null) data["files"] = files?.toJson();
  data["lang"] = lang;
  if (sentry != null) data["sentry"] = sentry?.toJson();
  if (thumbPreview != null) {
    data["thumb_preview"] = thumbPreview?.toJson();
  }
  data["referrer"] = referrer;
  data["cookie_domain"] = cookieDomain;
  data["timestamp"] = timestamp;
  if (gcDebug != null) data["gc_debug"] = gcDebug?.toJson();
  data["expires"] = expires;
  if (textTracks != null) {
    data["text_tracks"] = textTracks?.map((e) => e.toJson()).toList();
  }
  if (client != null) data["client"] = client?.toJson();
  data["currency"] = currency;
  data["session"] = session;
  if (cookie != null) data["cookie"] = cookie?.toJson();
  if (build != null) data["build"] = build?.toJson();
  if (urls != null) data["urls"] = urls?.toJson();
  data["signature"] = signature;
  if (flags != null) data["flags"] = flags?.toJson();
  data["country"] = country;
  if (fileCodecs != null) {
    data["file_codecs"] = fileCodecs?.toJson();
  }
  if (abTests != null) data["ab_tests"] = abTests?.toJson();
  return data;
}