The Wear Material SplitCheckboxButton offers two slots and shows the current toggle state via a checkbox.
@Sampled
@Composable
@WearPreviewDevices
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
fun RemoteSplitCheckboxButtonSample(modifier: RemoteModifier = RemoteModifier) {
val checked = rememberMutableRemoteBoolean(true)
RemoteSplitCheckboxButton(
checked = checked,
onCheckedChange = valueChange(checked, !checked),
toggleContentDescription = "Split Checkbox".rs,
onContainerClick = valueChange(checked, !checked),
modifier = modifier,
label = { RemoteText("Split Checkbox".rs) },
)
}