VideoData.fromJson constructor
VideoData.fromJson(
- Map<String, dynamic> json
)
Implementation
VideoData.fromJson(Map<String, dynamic> json) {
path = (json['path']);
title = json["isfileexist"] ? (basename(json['path']).split(".")[0]) : null;
mimetype = (json["mimetype"] == null || json["mimetype"] == "")
? null
: (json["mimetype"]);
date = (json["date"] == null || json["date"] == '') ? null : json["date"];
location = (json["location"] == null || json["location"] == '')
? null
: json["location"];
framerate = double.tryParse("${json["framerate"]}");
author = (json['author'] == null || json['author'] == '')
? null
: json['author'];
width = int.tryParse('${json['width']}');
height = int.tryParse('${json['height']}');
orientation = int.tryParse(json["orientation"]);
filesize = json['filesize'];
duration =
json["isfileexist"] ? double.tryParse('${json['duration']}') : null;
}