Skip to content

RPStepJumpRule

A navigation rule which maps from an answer to a step. If an answer value is specified then the survey jumps to that question if chosen. E.g.

answerMap: {
   3: instructionStepD.identifier,
   2: instructionStepC.identifier,
   1: instructionStepB.identifier,
   0: instructionStepA.identifier
 }

If answer value 2 is taken then the survey will jump to instructionStepC and continue from there.

Inheritance
Annotations

Constructors

RPStepJumpRule.fromJson

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

RPStepJumpRule

RPStepJumpRule({
  1. required Map<int, String> answerMap,
})

Properties

answerMap

Map<int, String> answerMap
getter/setter pair

A map of answer-value -> step-id linking the possible values of the answer to step. If a specific value is chosen, the survey jumps to the targeted next step. E.g. :

answerMap: {
   3: instructionStepD.identifier,
   2: instructionStepC.identifier,
   1: instructionStepB.identifier,
   0: instructionStepA.identifier
 }

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.