Skip to content

RPChoiceAnswerFormat

Class representing an Answer Format that lets participants choose from a fixed set of choices.

Inheritance
Annotations

Constructors

RPChoiceAnswerFormat.fromJson

RPChoiceAnswerFormat.fromJson(
  1. Map<String, dynamic> json
)

RPChoiceAnswerFormat

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.

Properties

answerStyle

RPChoiceAnswerStyle answerStyle
getter/setter pair

The answer style - single or multiple choice.

choices

List<RPChoice> choices
getter/setter pair

An array of available RPChoice objects which represent the choices to the participant.

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.