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