Checkbox
A two-state check box that switches between On and Off.
onCheckedChangemay be nullable, but if it's null the checkbox is basically disabled because in Compose, widgets don't change state by itself.
Tri-State Checkbox
A three-state checkbox that can switch between On, Off and Indeterminate.
onClickmay be nullable, but if it's null the checkbox is basically disabled because in Compose, widgets don't change state by itself.onClickdoes not pass any parameters. You must read the state yourself.statedoes not update automatically when clicked. You must change it yourself.
Color Customizations
Colors can be customized via CheckboxDefaults.colors().
- !:
CheckboxDefaults.color()does not expose all color parameters. However, this can be circumvented viaCheckboxDefaults.color().copy().