VerticalFeedItemQuizComponent

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

This data class represents the Quiz component.

Constructors

VerticalFeedItemQuizComponent
Link copied to clipboard
fun VerticalFeedItemQuizComponent(id: String, 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

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: VerticalFeedItemComponentType

Type of the interactive component