ScrollFieldDefaults


Object to hold defaults used by ScrollField.

Summary

Public functions

Unit
@Composable
Item(index: Int, selected: Boolean, colors: ScrollFieldColors)

The default item implementation for ScrollField.

Cmn
ScrollFieldColors

Default colors used by a ScrollField.

Cmn
ScrollFieldColors
@Composable
colors(
    containerColor: Color,
    unselectedContentColor: Color,
    selectedContentColor: Color
)

Creates a ScrollFieldColors that represents the default container, unselected, and selected colors used in a ScrollField.

Cmn

Public properties

Dp

The default height for a ScrollField.

Cmn
Shape

The default shape for the ScrollField container background.

Cmn

Public functions

Item

@Composable
fun Item(index: Int, selected: Boolean, colors: ScrollFieldColors = colors()): Unit

The default item implementation for ScrollField.

Parameters
index: Int

the current item index.

selected: Boolean

whether this item is currently selected (centered).

colors: ScrollFieldColors = colors()

the colors to use for the text content.

colors

@Composable
fun colors(): ScrollFieldColors

Default colors used by a ScrollField.

colors

@Composable
fun colors(
    containerColor: Color = Color.Unspecified,
    unselectedContentColor: Color = Color.Unspecified,
    selectedContentColor: Color = Color.Unspecified
): ScrollFieldColors

Creates a ScrollFieldColors that represents the default container, unselected, and selected colors used in a ScrollField.

Parameters
containerColor: Color = Color.Unspecified

The color of the ScrollField container.

unselectedContentColor: Color = Color.Unspecified

The color of the numerical value(s) visible on the screen that are not chosen.

selectedContentColor: Color = Color.Unspecified

The color of the numerical value that is centered and snapped into place.

Public properties

ScrollFieldHeight

val ScrollFieldHeightDp

The default height for a ScrollField. This can be used as a reference when providing a Modifier.height to the ScrollField to ensure enough vertical space is available to display the typical three-item layout.

shape

val shapeShape

The default shape for the ScrollField container background.