Reference

SubMenuButton

SubMenuButton

SubMenuButton control. Build it with the submenu_button helper.

Example

submenu_button(
  content: text("SubMenuButton"),
  leading: icon("menu"),
  trailing: icon("chevron_right"),
  expand: true,
  on_animation_end: ->(event) {}
)

Properties

  • alignment_offset
  • clip_behavior — How content overflowing the bounds is clipped.
  • content — The single child control rendered inside this control.
  • controls — The list of child controls.
  • leading — Control placed before the main content (e.g. an icon or avatar).
  • menu_style — Menu style.
  • 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_close — Fired on close.
  • on_focus — Fired when the control gains focus.
  • on_hover — Fired when the pointer enters/leaves the control.
  • on_open — Fired when the control opens.
  • on_size_change — Fired when the control's size changes.

Reference

  • Family: materials
  • Widget type: submenubutton
  • Helper: submenu_button