Reference

CupertinoSlidingSegmentedButton

CupertinoSlidingSegmentedButton

CupertinoSlidingSegmentedButton control. Build it with the cupertino_sliding_segmented_button helper.

Example

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

Properties

  • bgcolor — Background color.
  • controls — The list of child controls.
  • padding — Inner spacing between the border and the content.
  • proportional_width — Proportional width.
  • selected_index
  • thumb_color — Thumb 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: cupertinoslidingsegmentedbutton
  • Helper: cupertino_sliding_segmented_button