⌂
›
Reference
›
PopupMenuButton
PopupMenuButton
PopupMenuButton control. Build it with the popup_menu_button helper.
Example
popup_menu_button(
content: text("PopupMenuButton"),
icon: "add",
bgcolor: :surface_container_high,
expand: true,
on_animation_end: ->(event) {}
)
Properties
bgcolor— Background color.clip_behavior— How content overflowing the bounds is clipped.content— The single child control rendered inside this control.elevation— Shadow depth (z-height).enable_feedback— Plays touch feedback (sound/haptic) on interaction.icon— Icon name shown by the control.icon_color— Color of the icon.icon_sizeitemsmenu_padding— Menu padding.menu_positionpadding— Inner spacing between the border and the content.popup_animation_style— Popup animation style.shadow_color— Color of the drop shadow.shape— Shape/border of the control.size_constraints— Min/max size constraints.splash_radius— Splash radius.style— Style overrides for the control.
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_cancel— Fired on cancel.on_open— Fired when the control opens.on_select— Fired when a selection is made.on_size_change— Fired when the control's size changes.
Reference
- Family:
materials - Widget type:
popupmenubutton - Helper:
popup_menu_button