A labelled toggle switch row: label left, animated track + knob right. Clicking anywhere on
the row flips the state and fires onChange(on). The track colour and knob position tween
between states. Larger track and row height on mobile for touch.
Constructor
new(label:String, width:Float, on:Bool = false, ?onChange:Bool ‑> Void)
Parameters:
label | the row text (empty string = standalone switch) |
|---|---|
width | layout width (the switch sits at the right edge) |
on | the initial state |
onChange | fired after the state flips |
Variables
Methods
localize(key:String, fallback:String):Void
Switches the label to a localized string.
Parameters:
key | the translation key |
|---|---|
fallback | the source-language text |