Option

@Immutable
data class Option(val id: String, val text: String, val extraData: Map<String, Any> = emptyMap(), val textI18n: Map<String, String> = emptyMap())

The Option object represents an answer option in a poll.

Constructors

Link copied to clipboard
constructor(id: String, text: String, extraData: Map<String, Any> = emptyMap(), textI18n: Map<String, String> = emptyMap())

Properties

Link copied to clipboard

Any additional data associated with the option.

Link copied to clipboard
val id: String

The unique identifier of the option.

Link copied to clipboard

The text of the option.

Link copied to clipboard

Automatic translations of text. Key language contains the original language, other keys (<language>_text) contain translations.

Functions

Link copied to clipboard
fun getTranslation(language: String): String

Retrieves the translated text for the given language.