Datum.fromMap constructor
Implementation
factory Datum.fromMap(Map<String, dynamic> data) => Datum(
objectid: data['objectid'] as String,
trailer: data['trailer'] != null
? (data['trailer'] == []
? ""
: data['trailer'][0]['filelist'][0]['filename'])
: "",
objecttype: data['objecttype'] as String?,
partnerid: data['partnerid'] as String?,
title: data['title'] as String?,
defaulttitle: data['defaulttitle'] as String?,
defaultgenre: data['defaultgenre'] as String?,
publishtime: data['publishtime'] as String?,
endtime: data['endtime'] as String?,
shortdescription: data['shortdescription'] as dynamic,
ratingtype: data['ratingtype'] as String?,
pgrating: data['pgrating'] as String?,
parentid: data['parentid'] as dynamic,
objectstatus: data['objectstatus'] as String?,
genre: data['genre'] as String?,
subgenre: data['subgenre'] as dynamic,
thumbnail: data['thumbnail'] as dynamic,
tags: data['tags'] as List<dynamic>?,
contentlanguage: data['contentlanguage'] as List<dynamic>?,
objectowner: data['objectowner'] as String?,
jobid: data['jobid'] as dynamic,
longdescription: data['longdescription'] as String?,
objecttag: data['objecttag'] as dynamic,
seasoncount: data['seasoncount'] as int?,
details: data['details'] == null
? null
: Details.fromMap(data['details'] as Map<String, dynamic>),
productionyear: data['productionyear'] as dynamic,
releasedate: data['releasedate'] as dynamic,
imdbid: data['imdbid'] as dynamic,
advisory: data['advisory'] as dynamic,
// metacontent: data['metacontent'] == null
// ? null
// : Metacontent.fromMap(data['metacontent'] as Map<String, dynamic>),
skilllevel: data['skilllevel'] as dynamic,
estimatedtime: data['estimatedtime'] as dynamic,
whatwelearn: data['whatwelearn'] as dynamic,
category: data['category'] as String?,
subcategory: data['subcategory'] as dynamic,
seriesid: data['seriesid'] as dynamic,
seriesname: data['seriesname'] as dynamic,
seasonid: data['seasonid'] as dynamic,
seasonname: data['seasonname'] as dynamic,
seasonnum: data['seasonnum'] as dynamic,
episodenum: data['episodenum'] as dynamic,
albumid: data['albumid'] as dynamic,
albumname: data['albumname'] as dynamic,
track: data['track'] as dynamic,
duration: data['duration'] as int?,
totalduration: data['totalduration'] as int?,
watchedDuration: data['watchedDuration'] as int?,
startPosition: data['startPosition'] as int?,
playlead: data['playlead'] as String?,
bandorartist: data['bandorartist'] as dynamic,
skip: (data['skip'] as List<dynamic>?)
?.map((e) => SkipModel.fromMap(e as Map<String, dynamic>))
.toList(),
poster: (data['poster'] as List<dynamic>?)
?.map((e) => Poster.fromMap(e as Map<String, dynamic>))
.toList(),
resources: data['resources'] as List<dynamic>?,
contentdetails: (data['contentdetails'] as List<dynamic>?)
?.map((e) => Contentdetail.fromMap(e as Map<String, dynamic>))
.toList(),
);