Video.fromJson constructor

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

Implementation

Video.fromJson(Map<String, dynamic> json) {
  if (json["rating"] is Map) {
    rating = json["rating"] == null ? null : Rating.fromJson(json["rating"]);
  }
  if (json["version"] is Map) {
    version =
        json["version"] == null ? null : Version.fromJson(json["version"]);
  }
  if (json["height"] is int) height = json["height"];
  if (json["duration"] is int) duration = json["duration"];
  if (json["thumbs"] is Map) {
    thumbs =
        json["thumbs"] == null ? null : Thumbs.fromJson(json["thumbs"]);
  }
  if (json["owner"] is Map) {
    owner = json["owner"] == null ? null : VimeoOwner.fromJson(json["owner"]);
  }
  if (json["id"] is int) id = json["id"];
  if (json["embed_code"] is String) embedCode = json["embed_code"];
  if (json["title"] is String) title = json["title"];
  if (json["share_url"] is String) shareUrl = json["share_url"];
  if (json["width"] is int) width = json["width"];
  if (json["embed_permission"] is String) {
    embedPermission = json["embed_permission"];
  }
  if (json["fps"] is int) fps = json["fps"];
  if (json["spatial"] is int) spatial = json["spatial"];
  liveEvent = json["live_event"];
  if (json["allow_hd"] is int) allowHd = json["allow_hd"];
  if (json["hd"] is int) hd = json["hd"];
  lang = json["lang"];
  if (json["default_to_hd"] is int) defaultToHd = json["default_to_hd"];
  if (json["url"] is String) url = json["url"];
  if (json["privacy"] is String) privacy = json["privacy"];
  unlistedHash = json["unlisted_hash"];
}