Metadata constructor

Metadata({
  1. String? identifier,
  2. String? type,
  3. required LocalizedString localizedTitle,
  4. LocalizedString? localizedSubtitle,
  5. DateTime? modified,
  6. DateTime? published,
  7. List<String> languages = const [],
  8. LocalizedString? localizedSortAs,
  9. List<Subject> subjects = const [],
  10. List<Contributor> authors = const [],
  11. List<Contributor> contributors = const [],
  12. List<Contributor> translators = const [],
  13. List<Contributor> editors = const [],
  14. List<Contributor> artists = const [],
  15. List<Contributor> illustrators = const [],
  16. List<Contributor> letterers = const [],
  17. List<Contributor> pencilers = const [],
  18. List<Contributor> colorists = const [],
  19. List<Contributor> inkers = const [],
  20. List<Contributor> narrators = const [],
  21. List<Contributor> publishers = const [],
  22. List<Contributor> imprints = const [],
  23. String? description,
  24. double? duration,
  25. int? numberOfPages,
  26. Map<String, List<Collection>>? belongsTo,
  27. List<Collection> belongsToCollections = const [],
  28. List<Collection> belongsToSeries = const [],
  29. ReadingProgression readingProgression = ReadingProgression.auto,
  30. Presentation? rendition,
  31. Map<String, dynamic> otherMetadata = const {},
})

Implementation

Metadata(
    {this.identifier,
    this.type,
    required this.localizedTitle,
    this.localizedSubtitle,
    this.modified,
    this.published,
    this.languages = const [],
    this.localizedSortAs,
    this.subjects = const [],
    this.authors = const [],
    this.contributors = const [],
    this.translators = const [],
    this.editors = const [],
    this.artists = const [],
    this.illustrators = const [],
    this.letterers = const [],
    this.pencilers = const [],
    this.colorists = const [],
    this.inkers = const [],
    this.narrators = const [],
    this.publishers = const [],
    this.imprints = const [],
    this.description,
    this.duration,
    this.numberOfPages,
    Map<String, List<Collection>>? belongsTo,
    this.belongsToCollections = const [],
    this.belongsToSeries = const [],
    this.readingProgression = ReadingProgression.auto,
    this.rendition,
    this.otherMetadata = const {}})
    : this.belongsTo = belongsTo ?? {} {
  if (belongsToCollections.isNotEmpty) {
    this.belongsTo["collection"] = belongsToCollections;
  }
  if (belongsToSeries.isNotEmpty) {
    this.belongsTo["series"] = belongsToSeries;
  }
}