Reference

Semantics

Semantics

Semantics control. Build it with the semantics helper.

Example

semantics(
  value: "Sample",
  label: "Label",
  content: text("Semantics"),
  selected: true,
  on_tap: ->(event) {}
)

Properties

  • button
  • checked — Whether the control is checked.
  • container
  • content — The single child control rendered inside this control.
  • current_value_length
  • decreased_value
  • exclude_semantics
  • expanded
  • focus
  • focusable
  • header
  • heading_level
  • hidden
  • hint_text — Placeholder shown when the field is empty.
  • image
  • increased_value
  • label — Text label shown for the control.
  • link
  • live_region
  • max_value_length
  • mixed
  • multiline — Allows multiple lines of input when true.
  • obscured
  • read_only — Prevents editing while still allowing selection.
  • selected — Whether the control is selected.
  • slider
  • textfield
  • toggled
  • 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_copy — Fired on copy.
  • on_cut — Fired on cut.
  • on_decrease — Fired on decrease.
  • on_did_gain_accessibility_focus — Fired on did gain accessibility focus.
  • on_did_lose_accessibility_focus — Fired on did lose accessibility focus.
  • on_dismiss — Fired when the control is dismissed.
  • on_double_tap — Fired on a double tap.
  • on_increase — Fired on increase.
  • on_long_press — Fired on a long press.
  • on_long_press_hint_text — Fired on long press hint text.
  • on_move_cursor_backward_by_character — Fired on move cursor backward by character.
  • on_move_cursor_forward_by_character — Fired on move cursor forward by character.
  • on_paste — Fired on paste.
  • on_scroll_down — Fired on scroll down.
  • on_scroll_left — Fired on scroll left.
  • on_scroll_right — Fired on scroll right.
  • on_scroll_up — Fired on scroll up.
  • on_set_text — Fired on set text.
  • on_tap — Fired on a tap.
  • on_tap_hint_text — Fired on tap hint text.

Reference

  • Family: shared
  • Widget type: semantics
  • Helper: semantics