Switch
The Switch widget is a toggle control that allows users to turn a setting on or off.
Properties
Property
Description
enabled
If false, the switch is disabled and cannot be interacted with.
value
A boolean that determines the state of the switch: true for on, false for off.
activeColor
The color of the switch's thumb when it is in the "on" state.
inactiveThumbColor
The color of the switch's thumb when it is in the "off" state.
activeTrackColor
The color of the switch's track when it is in the "on" state.
inactiveTrackColor
The color of the switch's track when it is in the "off" state.
Default Properties
The Switch widget supports the following section of Default Properties:
Layout
- width
- height
- padding
- margin
- align
Last updated