copyWith method

EpubMetadata copyWith({
  1. Maybe<List<String>> titles = const Maybe.none(),
  2. Maybe<List<EpubMetadataCreator>> creators = const Maybe.none(),
  3. Maybe<List<String>> subjects = const Maybe.none(),
  4. Maybe<String?> description = const Maybe.none(),
  5. Maybe<List<String>> publishers = const Maybe.none(),
  6. Maybe<List<EpubMetadataContributor>> contributors = const Maybe.none(),
  7. Maybe<List<EpubMetadataDate>> dates = const Maybe.none(),
  8. Maybe<List<String>> types = const Maybe.none(),
  9. Maybe<List<String>> formats = const Maybe.none(),
  10. Maybe<List<EpubMetadataIdentifier>> identifiers = const Maybe.none(),
  11. Maybe<List<String>> sources = const Maybe.none(),
  12. Maybe<List<String>> languages = const Maybe.none(),
  13. Maybe<List<String>> relations = const Maybe.none(),
  14. Maybe<List<String>> coverages = const Maybe.none(),
  15. Maybe<List<String>> rights = const Maybe.none(),
  16. Maybe<List<EpubMetadataMeta>> metaItems = const Maybe.none(),
})

Implementation

EpubMetadata copyWith(
        {Maybe<List<String>> titles = const Maybe.none(),
        Maybe<List<EpubMetadataCreator>> creators = const Maybe.none(),
        Maybe<List<String>> subjects = const Maybe.none(),
        Maybe<String?> description = const Maybe.none(),
        Maybe<List<String>> publishers = const Maybe.none(),
        Maybe<List<EpubMetadataContributor>> contributors =
            const Maybe.none(),
        Maybe<List<EpubMetadataDate>> dates = const Maybe.none(),
        Maybe<List<String>> types = const Maybe.none(),
        Maybe<List<String>> formats = const Maybe.none(),
        Maybe<List<EpubMetadataIdentifier>> identifiers = const Maybe.none(),
        Maybe<List<String>> sources = const Maybe.none(),
        Maybe<List<String>> languages = const Maybe.none(),
        Maybe<List<String>> relations = const Maybe.none(),
        Maybe<List<String>> coverages = const Maybe.none(),
        Maybe<List<String>> rights = const Maybe.none(),
        Maybe<List<EpubMetadataMeta>> metaItems = const Maybe.none()}) =>
    EpubMetadata(
        titles.valueOr(this.titles),
        creators.valueOr(this.creators),
        subjects.valueOr(this.subjects),
        description.valueOr(this.description),
        publishers.valueOr(this.publishers),
        contributors.valueOr(this.contributors),
        dates.valueOr(this.dates),
        types.valueOr(this.types),
        formats.valueOr(this.formats),
        identifiers.valueOr(this.identifiers),
        sources.valueOr(this.sources),
        languages.valueOr(this.languages),
        relations.valueOr(this.relations),
        coverages.valueOr(this.coverages),
        rights.valueOr(this.rights),
        metaItems.valueOr(this.metaItems));