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