RPChoiceAnswerFormat.withParams constructor

RPChoiceAnswerFormat.withParams(ChoiceAnswerStyle answerStyle, List<RPChoice> _choices)

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

Implementation

RPChoiceAnswerFormat.withParams(this.answerStyle, this._choices) {
  questionType =
      answerStyle == ChoiceAnswerStyle.SingleChoice ? QuestionType.SingleChoice : QuestionType.MultipleChoice;
}