⌂
›
Reference
›
CupertinoSwitch
CupertinoSwitch
CupertinoSwitch control. Build it with the cupertino_switch helper.
Example
cupertino_switch(
value: "Sample",
label: "Label",
expand: true,
width: 240,
on_change: ->(event) {}
)
Properties
active_thumb_imageactive_thumb_image_srcactive_track_color— Active track color.autofocus— Requests focus when first shown.focus_color— Color shown while focused.inactive_thumb_color— Inactive thumb color.inactive_thumb_imageinactive_thumb_image_srcinactive_track_color— Inactive track color.label— Text label shown for the control.label_positionoff_label_color— Off label color.thumb_color— Thumb color.thumb_icon— Thumb icon.track_outline_color— Track outline color.track_outline_width— Track outline width.value— The control's current value.
Plus the common layout and animation properties shared by most controls (expand, visible, disabled, opacity, width, height, align, tooltip, animate_*, …).
Events
on_animation_end— Fired when an animation completes.on_blur— Fired when the control loses focus.on_change— Fired when the value changes.on_focus— Fired when the control gains focus.on_image_error— Fired when the image fails to load.on_label_color— Fired on label color.on_size_change— Fired when the control's size changes.
Reference
- Family:
cupertinos - Widget type:
cupertinoswitch - Helper:
cupertino_switch