toMap method
Converts the object to a map for serialization.
Implementation
@override
Map<String, dynamic> toMap() {
return {
'metadataType': metadataType.value,
'title': title,
'subtitle': subtitle,
'images': images?.map((x) => x.toMap()).toList(),
'releaseDate': releaseDate?.millisecondsSinceEpoch,
}..removeWhere((key, value) => value == null);
}