Video.fromJson constructor

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

Video.fromJson Mapping object to Video

Implementation

factory Video.fromJson(Map<String, dynamic> json) {
  /// Return [Video]
  return Video(
      id: json['id'] as int?,
      width: json['width']as int?,
      height: json['height']as int?,
      duration: json['duration']as int?,
      url: json['url']as String?,
      image: json['image']as String?,
      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'],
   */
}