toMap method Null safety
Implementation
Map<String, dynamic> toMap() {
return {
'video': video.toMap(),
'comments': comments?.map((comment) => comment.toMap()).toList(),
'recommendations':
recommendations?.map((video) => video.toMap()).toList(),
};
}