StoryQuizComponent

data class StoryQuizComponent(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(title: String, options: List<String>, rightAnswerIndex: Int?, selectedOptionIndex: Int, customPayload: String?)

Properties

customPayload
Link copied to clipboard
val customPayload: String?
Custom payload for this quiz if exists
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