copyWith method

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

Implementation

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