settings

fun settings(disabledStateAlpha: Float = 0.38f, disabledStateGrayscale: Boolean = false, toggleBooleanOnItemClick: Boolean = false, maxLinesValue: Int = 2, animationSpec: AnimationSpec<Float>? = tween( durationMillis = 200, easing = FastOutLinearInEasing ), subScreenEndIndicator: @Composable () -> Unit? = { Icon( imageVector = Icons.AutoMirrored.Filled.KeyboardArrowRight, contentDescription = null ) }, style: PreferenceStyle = DefaultStyle.create(), forceNoIconInset: Boolean = false, minTextAreaWidth: Dp = 48.dp, leadingContentEndPadding: Dp = 16.dp, trailingContentStartPadding: Dp = 16.dp): PreferenceSettings

use this function to create a PreferenceSettings object

Parameters

disabledStateAlpha

this value should be between 0f, 1f and defines the alpha value which which a disabled preference item is blended

disabledStateGrayscale

if true, a disabled preference will grayscale its content

toggleBooleanOnItemClick

if true, clicking a boolean preference will toggle its state, otherwise only clicks on the checkbox/switch will toggle it

maxLinesValue

the maximum lines of texts for the content area of a preference

animationSpec

a optional AnimationSpec that defines the animation for preferences on initial display - use null to disable the animation

subScreenEndIndicator

a optional Composable that defines a trailing indicator for sub screen preferences - use null to disable it

style

the default PreferenceStyle that should be used by all preferences

forceNoIconInset

enable this flag to inset items correctly to align with other items with icons

minTextAreaWidth

minimum width or the text area (the title/subtitle area)

leadingContentEndPadding

the padding between the leading content and the title/subtitle area

trailingContentStartPadding

the padding between the title/subtitle area and the trailing content area