Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Enum that represents possible star states.

Functions

Link copied to clipboard
fun RatingDisplay(@FloatRange(from = 0.0, to = 5.0) value: Float, modifier: Modifier = Modifier, size: Dp = RatingDefault.SmallStarSize)

A display for a rating value.

Link copied to clipboard
fun RatingFull(@FloatRange(from = 0.0, to = 5.0) value: Float, modifier: Modifier = Modifier, commentCount: Int? = null, label: String? = null, locale: Locale? = firstLocale())

Display the value rating of an user with stars optionally followed by a label and/or commentCount in the following form 3,4 ★★★☆☆ Communication (5)

Link copied to clipboard
fun RatingInput(@IntRange(from = 0, to = 5) value: Int, onRatingChanged: (Int) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, stateDescription: (Int) -> String = { "$it stars" }, allowSemantics: Boolean = true, testTag: String? = null)

A rating input component that allows the user to select a rating from 0 to 5. This component can have it's value changed either by a tap on the star or dragging horizontally.

Link copied to clipboard
fun RatingSimple(@FloatRange(from = 0.0, to = 5.0) value: Float, modifier: Modifier = Modifier, commentCount: Int? = null, locale: Locale = firstLocale(), labelSide: RatingLabelSide = RatingDefault.LabelSide)

Component that displays a compressed version of user rating

Link copied to clipboard
fun RatingSimpleLarge(@FloatRange(from = 0.0, to = 5.0) value: Float, modifier: Modifier = Modifier, locale: Locale = firstLocale(), labelSide: RatingLabelSide = RatingDefault.LabelSide)

This function displays a large simple version of user rating.

Link copied to clipboard
fun RatingStar(modifier: Modifier = Modifier, size: Dp = RatingDefault.SmallStarSize, state: RatingStarState = RatingStarState(1), enabled: Boolean = true)

RatingStar is the atomic element of rating components

Link copied to clipboard

Return corresponding RatingStarState based on a Boolean representation

fun RatingStarState(@FloatRange(from = 0.0, to = 1.0) starValue: Double): RatingStarState

Return corresponding RatingStarState based on a Double representation

fun RatingStarState(@FloatRange(from = 0.0, to = 1.0) starValue: Float): RatingStarState

Return corresponding RatingStarState based on a Float representation

fun RatingStarState(@IntRange(from = 0, to = 1) starValue: Int): RatingStarState

Return corresponding RatingStarState based on a Int representation