Switch

fun Switch(modifier: Modifier = Modifier, isChecked: Boolean = false, enabled: Boolean = true, onCheckedChange: (Boolean) -> Unit)

DHIS2 Switch wraps Material 3 Switch.

Parameters

modifier

: optional modifier.

isChecked

: whether switch is selected or not

enabled

: controls the enabled state of the button. When false, this button will not be clickable and will appear disabled to accessibility services.

onCheckedChange

: access to the on checked changed event.