copyWith method

MCQAnswerConfig copyWith({
  1. String? id,
  2. String? answer,
  3. bool? isSelected,
  4. bool? isCorrectAnswer,
  5. bool? isIncorrectAnswer,
})

Implementation

MCQAnswerConfig copyWith({
  String? id,
  String? answer,
  bool? isSelected,
  bool? isCorrectAnswer,
  bool? isIncorrectAnswer,
}) {
  return MCQAnswerConfig(
    id: id ?? this.id,
    answer: answer ?? this.answer,
    isCorrectAnswer: isCorrectAnswer ?? this.isCorrectAnswer,
    isIncorrectAnswer: isIncorrectAnswer ?? this.isIncorrectAnswer,
    isSelected: isSelected ?? this.isSelected,
  );
}