copyWith method

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

Implementation

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