Request.fromJson constructor

Request.fromJson(
  1. Map<String, dynamic> json
)

Implementation

Request.fromJson(Map<String, dynamic> json) {
  if (json["files"] is Map) {
    files = json["files"] == null ? null : Files.fromJson(json["files"]);
  }
  if (json["lang"] is String) lang = json["lang"];
  if (json["sentry"] is Map) {
    sentry = json["sentry"] == null ? null : Sentry.fromJson(json["sentry"]);
  }
  if (json["thumb_preview"] is Map) {
    thumbPreview = json["thumb_preview"] == null
        ? null
        : ThumbPreview.fromJson(json["thumb_preview"]);
  }
  referrer = json["referrer"];
  if (json["cookie_domain"] is String) {
    cookieDomain = json["cookie_domain"];
  }
  if (json["timestamp"] is int) timestamp = json["timestamp"];
  if (json["gc_debug"] is Map) {
    gcDebug =
        json["gc_debug"] == null ? null : GcDebug.fromJson(json["gc_debug"]);
  }
  if (json["expires"] is int) expires = json["expires"];
  if (json["text_tracks"] is List) {
    textTracks = json["text_tracks"] == null
        ? null
        : (json["text_tracks"] as List)
            .map((e) => TextTracks.fromJson(e))
            .toList();
  }
  if (json["client"] is Map) {
    client = json["client"] == null ? null : Client.fromJson(json["client"]);
  }
  if (json["currency"] is String) currency = json["currency"];
  if (json["session"] is String) session = json["session"];
  if (json["cookie"] is Map) {
    cookie = json["cookie"] == null ? null : Cookie.fromJson(json["cookie"]);
  }
  if (json["build"] is Map) {
    build = json["build"] == null ? null : Build.fromJson(json["build"]);
  }
  if (json["urls"] is Map) {
    urls = json["urls"] == null ? null : Urls.fromJson(json["urls"]);
  }
  if (json["signature"] is String) signature = json["signature"];
  if (json["flags"] is Map) {
    flags = json["flags"] == null ? null : Flags.fromJson(json["flags"]);
  }
  if (json["country"] is String) country = json["country"];
  if (json["file_codecs"] is Map) {
    fileCodecs = json["file_codecs"] == null
        ? null
        : FileCodecs.fromJson(json["file_codecs"]);
  }
  if (json["ab_tests"] is Map) {
    abTests =
        json["ab_tests"] == null ? null : AbTests.fromJson(json["ab_tests"]);
  }
}