copyWithWrapped method

ChapterWithContentResponseModel copyWithWrapped({
  1. Wrapped<String>? chapterId,
  2. Wrapped<String>? name,
  3. Wrapped? lastConversionDateUnix,
  4. Wrapped? conversionProgress,
  5. Wrapped<bool>? canBeDownloaded,
  6. Wrapped<ChapterWithContentResponseModelState>? state,
  7. Wrapped? statistics,
  8. Wrapped? lastConversionError,
  9. Wrapped<ChapterContentResponseModel>? content,
})

Implementation

ChapterWithContentResponseModel copyWithWrapped(
    {Wrapped<String>? chapterId,
    Wrapped<String>? name,
    Wrapped<dynamic>? lastConversionDateUnix,
    Wrapped<dynamic>? conversionProgress,
    Wrapped<bool>? canBeDownloaded,
    Wrapped<enums.ChapterWithContentResponseModelState>? state,
    Wrapped<dynamic>? statistics,
    Wrapped<dynamic>? lastConversionError,
    Wrapped<ChapterContentResponseModel>? content}) {
  return ChapterWithContentResponseModel(
      chapterId: (chapterId != null ? chapterId.value : this.chapterId),
      name: (name != null ? name.value : this.name),
      lastConversionDateUnix: (lastConversionDateUnix != null
          ? lastConversionDateUnix.value
          : this.lastConversionDateUnix),
      conversionProgress: (conversionProgress != null
          ? conversionProgress.value
          : this.conversionProgress),
      canBeDownloaded: (canBeDownloaded != null
          ? canBeDownloaded.value
          : this.canBeDownloaded),
      state: (state != null ? state.value : this.state),
      statistics: (statistics != null ? statistics.value : this.statistics),
      lastConversionError: (lastConversionError != null
          ? lastConversionError.value
          : this.lastConversionError),
      content: (content != null ? content.value : this.content));
}