copyWith method

EpubChapterRef copyWith({
  1. Maybe<EpubTextContentFileRef> epubTextContentFileRef = const Maybe.none(),
  2. Maybe<String> title = const Maybe.none(),
  3. Maybe<String> contentFileName = const Maybe.none(),
  4. Maybe<String?> anchor = const Maybe.none(),
  5. Maybe<List<EpubChapterRef>> subChapters = const Maybe.none(),
})

Implementation

EpubChapterRef copyWith(
        {Maybe<EpubTextContentFileRef> epubTextContentFileRef =
            const Maybe.none(),
        Maybe<String> title = const Maybe.none(),
        Maybe<String> contentFileName = const Maybe.none(),
        Maybe<String?> anchor = const Maybe.none(),
        Maybe<List<EpubChapterRef>> subChapters = const Maybe.none()}) =>
    EpubChapterRef(
        epubTextContentFileRef.valueOr(this.epubTextContentFileRef),
        title.valueOr(this.title),
        contentFileName.valueOr(this.contentFileName),
        anchor.valueOr(this.anchor),
        subChapters.valueOr(this.subChapters));