Video.fromJson constructor

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

Creates a Video object from JSON object

Implementation

factory Video.fromJson(Map<String, dynamic> json) {
  return Video(
    fileId: json['file_id']!,
    fileUniqueId: json['file_unique_id']!,
    width: json['width']!,
    height: json['height']!,
    duration: json['duration']!,
    thumbnail: json['thumbnail'] != null
        ? PhotoSize.fromJson(json['thumbnail']!)
        : null,
    fileName: json['file_name'],
    mimeType: json['mime_type'],
    fileSize: json['file_size'],
  );
}