RPChoiceAnswerFormat constructor

RPChoiceAnswerFormat({
  1. required RPChoiceAnswerStyle answerStyle,
  2. required List<RPChoice> choices,
})

Returns an initialized choice answer format with the given ChoiceAnswerStyle and the set of RPChoices.

Implementation

RPChoiceAnswerFormat({required this.answerStyle, required this.choices})
    : super() {
  questionType = (answerStyle == RPChoiceAnswerStyle.SingleChoice)
      ? RPQuestionType.SingleChoice
      : RPQuestionType.MultipleChoice;
}