Add a toggle switch using the EdgeTX style.
lvgl.toggle([parent], {settings})
parent:toggle({settings})
See the API page for parameter description and common settings.
Toggle specific settings:
get
Function
Called to get the curent state of the toggle switch. Must return a number value - 0 if the toggle switch is off, 1 if it should be on.
nil
set
Function
Called when the user interacts with the toggle switch. The function is passed a single number parameter - 0 if the toggle switch is off, 1 if it is on.
nil
LVGL object
BW radios
Color radios
Only available for One-Time scripts
2.11.0
Introduced