ScrollFieldDefaults


Object to hold defaults used by ScrollField.

Summary

Public functions

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

The default item implementation for ScrollField.

Cmn
ScrollFieldColors

Default colors used by a ScrollField.

Cmn
ScrollFieldColors
@Composable
colors(
    containerColor: Color,
    contentColor: Color,
    selectedContentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    disabledSelectedContentColor: Color
)

Creates a ScrollFieldColors that represents the default container, content, 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,
    enabled: Boolean = true,
    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).

enabled: Boolean = true

whether this item is currently enabled.

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,
    contentColor: Color = Color.Unspecified,
    selectedContentColor: Color = Color.Unspecified,
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = Color.Unspecified,
    disabledSelectedContentColor: Color = Color.Unspecified
): ScrollFieldColors

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

Parameters
containerColor: Color = Color.Unspecified

The color of the ScrollField container, when enabled.

contentColor: Color = Color.Unspecified

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

selectedContentColor: Color = Color.Unspecified

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

disabledContainerColor: Color = Color.Unspecified

The color of the ScrollField container, when disabled.

disabledContentColor: Color = Color.Unspecified

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

disabledSelectedContentColor: Color = Color.Unspecified

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

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.