Reference

MenuItemButton

MenuItemButton

MenuItemButton control. Build it with the menu_item_button helper.

Example

menu_item_button(
  content: text("MenuItemButton"),
  leading: icon("menu"),
  trailing: icon("chevron_right"),
  expand: true,
  on_click: ->(event) {}
)

Properties

  • autofocus — Requests focus when first shown.
  • clip_behavior — How content overflowing the bounds is clipped.
  • close_on_click
  • content — The single child control rendered inside this control.
  • focus_on_hover
  • leading — Control placed before the main content (e.g. an icon or avatar).
  • overflow_axis
  • semantic_label
  • style — Style overrides for the control.
  • trailing — Control placed after the main content.

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_click — Fired when the control is clicked/tapped.
  • on_focus — Fired when the control gains focus.
  • on_hover — Fired when the pointer enters/leaves the control.
  • on_size_change — Fired when the control's size changes.

Reference

  • Family: materials
  • Widget type: menuitembutton
  • Helper: menu_item_button