StoryQuizComponent

data class StoryQuizComponent(id: String, title: String, options: List<String>, rightAnswerIndex: Int?, selectedOptionIndex: Int, customPayload: String?) : StoryComponent

This data class represents the Quiz component.

Constructors

StoryQuizComponent
Link copied to clipboard
fun StoryQuizComponent(id: String, title: String, options: List<String>, rightAnswerIndex: Int?, selectedOptionIndex: Int, customPayload: String?)

Properties

customPayload
Link copied to clipboard
open override val customPayload: String?

Custom payload for this quiz if exists

id
Link copied to clipboard
open override val id: String

Id of the interactive component

options
Link copied to clipboard
val options: List<String>

List of options in the quiz

rightAnswerIndex
Link copied to clipboard
val rightAnswerIndex: Int?

Index of the right answer if exists

selectedOptionIndex
Link copied to clipboard
val selectedOptionIndex: Int

Option index that the user selected

title
Link copied to clipboard
val title: String

Title of the quiz if exists

type
Link copied to clipboard
val type: StoryComponentType

Type of the interactive component