Video.fromJson constructor
Video.fromJson Mapping object to Video
Implementation
factory Video.fromJson(Map<String, dynamic> json) {
/// Return [Video]
return Video(
id: json['id'],
width: json['width'],
height: json['height'],
duration: json['duration'],
url: json['url'],
image: json['image'],
user: json['user'] != null ? User.fromJson(json['user']) : null,
videoFiles: _videoFileList(json['video_files'] as List<dynamic>?),
videoPictures:
_videoPictureList(json['video_pictures'] as List<dynamic>?));
/**
* if (json['tags'] != null) {
* tags = <Null>[];
* json['tags'].forEach((v) {
* tags!.add(new Null.fromJson(v));
* });
* }
* fullRes: json['full_res'],
* avgColor: json['avg_color'],
*/
}