ResultItem

data class ResultItem(val option: Option, val isWinner: Boolean, val voteCount: Int, val votes: List<Vote>, val showAllButton: Boolean = false)

Represents a single poll result item for one option.

Contains the option details, vote count, winner status, a preview of votes (typically limited to a few votes), and a flag indicating whether to show the "Show All" button to navigate to the detailed view.

Parameters

option

The poll option associated with this result.

isWinner

True if this option has the highest vote count and is the winner.

voteCount

The total number of votes for this option.

votes

The preview list of votes for this option (typically limited to a few items).

showAllButton

True if the "Show All" button should be displayed to view all votes.

Constructors

Link copied to clipboard
constructor(option: Option, isWinner: Boolean, voteCount: Int, votes: List<Vote>, showAllButton: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val showAllButton: Boolean = false
Link copied to clipboard
Link copied to clipboard