copyWithWrapped method

LongreadItem copyWithWrapped({
  1. Wrapped<int>? id,
  2. Wrapped<LongreadType>? type,
  3. Wrapped<String>? name,
  4. Wrapped<PublicationState>? state,
  5. Wrapped<String?>? publishDate,
  6. Wrapped<String?>? publishedAt,
  7. Wrapped<List<ExerciseItem>>? exercises,
})

Implementation

LongreadItem copyWithWrapped({
  Wrapped<int>? id,
  Wrapped<enums.LongreadType>? type,
  Wrapped<String>? name,
  Wrapped<enums.PublicationState>? state,
  Wrapped<String?>? publishDate,
  Wrapped<String?>? publishedAt,
  Wrapped<List<ExerciseItem>>? exercises,
}) {
  return LongreadItem(
    id: (id != null ? id.value : this.id),
    type: (type != null ? type.value : this.type),
    name: (name != null ? name.value : this.name),
    state: (state != null ? state.value : this.state),
    publishDate: (publishDate != null ? publishDate.value : this.publishDate),
    publishedAt: (publishedAt != null ? publishedAt.value : this.publishedAt),
    exercises: (exercises != null ? exercises.value : this.exercises),
  );
}