copyWith method

EpubBook copyWith({
  1. Maybe<String?> title = const Maybe.none(),
  2. Maybe<String> author = const Maybe.none(),
  3. Maybe<List<String>> authorList = const Maybe.none(),
  4. Maybe<EpubSchema> schema = const Maybe.none(),
  5. Maybe<EpubContent> content = const Maybe.none(),
  6. Maybe<Image?> coverImage = const Maybe.none(),
  7. Maybe<List<EpubChapter>> chapters = const Maybe.none(),
})

Implementation

EpubBook copyWith(
        {Maybe<String?> title = const Maybe.none(),
        Maybe<String> author = const Maybe.none(),
        Maybe<List<String>> authorList = const Maybe.none(),
        Maybe<EpubSchema> schema = const Maybe.none(),
        Maybe<EpubContent> content = const Maybe.none(),
        Maybe<Image?> coverImage = const Maybe.none(),
        Maybe<List<EpubChapter>> chapters = const Maybe.none()}) =>
    EpubBook(
        title.valueOr(this.title),
        author.valueOr(this.author),
        authorList.valueOr(this.authorList),
        schema.valueOr(this.schema),
        content.valueOr(this.content),
        coverImage.valueOr(this.coverImage),
        chapters.valueOr(this.chapters));