Package-level declarations

Types

Link copied to clipboard

This error indicates that this poll creation contains a duplicated option item.

Link copied to clipboard
sealed interface PollOptionError

Indicates the error of the poll while configuring the options.

Link copied to clipboard
data class PollOptionItem(val title: String, val key: String = UUID.randomUUID().toString(), val pollOptionError: PollOptionError? = null)

The option item for creating a poll.

Functions

Link copied to clipboard
fun CreatePollScreen(onBack: () -> Unit, onCreatePoll: (CreatePollParams) -> Unit)

Screen for creating a new poll with options and configuration switches.

Link copied to clipboard
fun PollCreationDiscardDialog(usePlatformDefaultWidth: Boolean = false, onCancelClicked: () -> Unit, onDiscardClicked: () -> Unit)

A dialog to ask if a user wants to discard the current poll creation information.

Link copied to clipboard
fun PollCreationHeader(modifier: Modifier = Modifier, onBackPressed: () -> Unit = {}, enabledCreation: Boolean, onPollCreateClicked: () -> Unit, leadingContent: @Composable RowScope.() -> Unit? = null, centerContent: @Composable RowScope.() -> Unit? = null, trailingContent: @Composable RowScope.() -> Unit? = null)

Poll's creation header (toolbar) Composable that consist of several components.

Link copied to clipboard
fun PollOptionList(modifier: Modifier = Modifier, title: String = stringResource(id = R.string.stream_compose_poll_option_title), optionItems: List<PollOptionItem> = emptyList(), onQuestionsChanged: (List<PollOptionItem>) -> Unit)

The Poll Creation option list that is a Composable that enables users to create and reorder question items easily.

Link copied to clipboard
fun PollQuestionInput(modifier: Modifier = Modifier, title: String = stringResource(id = R.string.stream_compose_poll_questions_title), question: String, onQuestionChanged: (String) -> Unit)

Poll option's question Composable that consist of the title and PollOptionInput.