Compose-Settings
Toggle table of contents
common
Target filter
common
Switch theme
Search in API
Skip to content
Compose-Settings
ui-tiles
/
com.alorma.compose.settings.ui
/
SettingsSwitch
Settings
Switch
@
Composable
fun
SettingsSwitch
(
state
:
Boolean
,
title
:
@
Composable
(
)
->
Unit
,
modifier
:
Modifier
=
Modifier
,
enabled
:
Boolean
=
LocalSettingsGroupEnabled.current
,
icon
:
@
Composable
(
)
->
Unit
?
=
null
,
subtitle
:
@
Composable
(
)
->
Unit
?
=
null
,
colors
:
SettingsTileColors
=
SettingsTileDefaults.colors()
,
switchColors
:
SwitchColors
=
SwitchDefaults.colors( checkedTrackColor = colors.actionColor(enabled), checkedThumbColor = contentColorFor(colors.actionColor(enabled)), disabledCheckedTrackColor = colors.actionColor(enabled), disabledCheckedThumbColor = contentColorFor(colors.actionColor(enabled)), )
,
textStyles
:
SettingsTextStyles
=
SettingsTileDefaults.textStyles()
,
shape
:
Shape
=
SettingsTileDefaults.shape()
,
tonalElevation
:
Dp
=
SettingsTileDefaults.Elevation
,
shadowElevation
:
Dp
=
SettingsTileDefaults.Elevation
,
semanticProperties
:
SemanticsPropertyReceiver
.
(
)
->
Unit
=
{}
,
onCheckedChange
:
(
Boolean
)
->
Unit
)