VideoCaption.fromMap constructor
VideoCaption.fromMap(
- Map<String, dynamic> map
)
Implementation
factory VideoCaption.fromMap(
Map<String, dynamic> map,
) {
map = {
'\$id': "",
'\$createdAt': "",
'\$updatedAt': "",
'videoId': "",
'bucketId': "",
'fileId': "",
'name': "",
'language': "",
'default': false,
'embedded': false,
'targetDuration': 0,
'status': "pending",
'error': "",
'size': 0,
...map,
};
return VideoCaption(
$id: map['\$id'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
videoId: map['videoId'].toString(),
bucketId: map['bucketId'].toString(),
fileId: map['fileId'].toString(),
name: map['name'].toString(),
language: map['language'].toString(),
xdefault: map['default'],
embedded: map['embedded'],
targetDuration: map['targetDuration'].toDouble(),
status: enums.VideoCaptionStatus.values.firstWhere(
(e) => e.value == map['status'],
),
error: map['error'].toString(),
size: map['size'],
);
}