Skip to content

RPImageChoice

The image choice object which the participants can choose from, during a RPQuestionStep with RPImageChoiceAnswerFormat

Inheritance
Annotations

Constructors

RPImageChoice.fromJson

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

RPImageChoice

RPImageChoice({
  1. required String imageUrl,
  2. String? key,
  3. dynamic value,
  4. required String description,
})

Properties

description

String description
getter/setter pair

The description fitting the image. Is displayed when selected.

fromJsonFunction

Function get fromJsonFunction
override

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

imageUrl

String imageUrl
getter/setter pair

The image portraying the choice.

key

String? key
getter/setter pair

The key of the image if this is to be loaded from the images in the assets on the phone. Specify either the image or the key.

value

dynamic value
getter/setter pair

The value of the choice. Can be any type but MUST be serializable if this feature is used.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.