A class that represents a switch that can be turned on and off.
@ extends Widget implements ValueWidget
Create a new switch.
Optional
The label text.
Whether the switch is initially checked.
The callback function to call when the switch is changed.
Do the necessary initialization.
Add one or more classes to an element.
Rest
Bind a property to the switch.
The object to bind the property to.
The property to bind.
Destroy the element
Get whether the switch is checked.
Set the callback function to call when the switch is changed.
Add a click event listener to the widget.
The function to call when the widget is clicked.
Remove one or more classes from an element.
Set the content of the widget.
The value to set the content to.
Set the label of the switch.
Set the text of the widget.
The value to set the text to.
Set whether the switch is checked.
A class that represents a switch that can be turned on and off.
@ extends Widget implements ValueWidget