Source set: Common
public object ScrollFieldDefaults
Object to hold defaults used by ScrollField.
Properties
ScrollFieldHeight
Source set: Common
public val ScrollFieldHeight: Dp = 200.dp
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
Source set: Common
public val shape: Shape
The default shape for the ScrollField container background.
Functions
colors
Source set: Common
@Composable
public fun colors(): ScrollFieldColors
Default colors used by a ScrollField.
colors
Source set: Common
@Composable
public 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 | The color of the ScrollField container. |
| unselectedContentColor | The color of the numerical value(s) visible on the screen that are not chosen. |
| selectedContentColor | The color of the numerical value that is centered and snapped into place. |
Item
Source set: Common
@Composable
public fun Item(index: Int, selected: Boolean, colors: ScrollFieldColors = colors())
The default item implementation for ScrollField.
Parameters
| index | the current item index. |
| selected | whether this item is currently selected (centered). |
| colors | the colors to use for the text content. |