fromJson static method
Implementation
static AlternativeVideo? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return AlternativeVideo(
id: int.tryParse((json['id'] as dynamic)?.toString() ?? '') ?? 0,
width: (json['width'] as int?) ?? 0,
height: (json['height'] as int?) ?? 0,
codec: (json['codec'] as String?) ?? '',
hlsFile: File.fromJson(tdMapFromJson(json['hls_file'])),
video: File.fromJson(tdMapFromJson(json['video'])),
);
}