Media.fromJson constructor
Implementation
factory Media.fromJson(Map<String, Object?> json) => Media(
kind: json["kind"] == null ? null : json["kind"] as String,
width: json["width"] == null ? null : (json["width"] as num).toInt(),
height: json["height"] == null ? null : (json["height"] as num).toInt(),
durationMs: json["duration_ms"] == null
? null
: (json["duration_ms"] as num).toInt(),
pageCount: json["page_count"] == null
? null
: (json["page_count"] as num).toInt(),
frameCount: json["frame_count"] == null
? null
: (json["frame_count"] as num).toInt(),
colorSpace:
json["color_space"] == null ? null : json["color_space"] as String,
hasAlpha: json["has_alpha"] == null ? null : json["has_alpha"] as bool,
codec: json["codec"] == null ? null : json["codec"] as String,
aspectRatio: json["aspect_ratio"] == null
? null
: json["aspect_ratio"] as String,
);