Switch
Switch component allows the user to activate or deactivate the state of an element or concept. It is usually used as an element to add services, activate functionalities or adjust settings. It is also used to control binary options (On/Off or True/False).
Parameters
whether or not this component is checked
callback to be invoked when Switch is being clicked, therefore the change of checked state is requested. If null, then this is passive and relies entirely on a higher-level component to control the "checked" state.
Modifier to be applied to switch layout
whether the component is enabled or grayed out
The ToggleIntent to use to draw the component
represents the pair of icons to use for check/unchecked states, you can use SwitchDefaults.icons if you want to use the default ones.
the MutableInteractionSource representing the stream of Interactions for this Switch. You can create and pass in your own remembered MutableInteractionSource if you want to observe Interactions and customize the appearance / behavior of this Switch in different Interactions.