Reference

CupertinoSegmentedButton

CupertinoSegmentedButton

CupertinoSegmentedButton control. Build it with the cupertino_segmented_button helper.

Example

cupertino_segmented_button(
  expand: true,
  width: 240,
  height: 120,
  on_change: ->(event) {}
)

Properties

  • border_color — Border color.
  • click_color — Click color.
  • controls — The list of child controls.
  • disabled_color — Disabled color.
  • disabled_text_color — Disabled text color.
  • padding — Inner spacing between the border and the content.
  • selected_color — Selected color.
  • selected_index
  • unselected_color — Unselected color.

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_change — Fired when the value changes.
  • on_size_change — Fired when the control's size changes.

Reference

  • Family: cupertinos
  • Widget type: cupertinosegmentedbutton
  • Helper: cupertino_segmented_button