A compact pill chip. With hasDot = true it's a stateful toggle showing a status dot
(on flips on click, then onToggle(on) fires); without a dot it's a value chip whose
text the owner updates and whose onClick typically cycles the value. Auto-sizes to its
label.
Constructor
new(label:String, hasDot:Bool = false, on:Bool = false, ?onToggle:Bool ‑> Void)
Parameters:
label | the chip text |
|---|---|
hasDot |
|
on | the initial toggle state (dot chips only) |
onToggle | fired after the chip flips its own state |
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 |