pub type MenuArgs = MenuProviderArgs;Expand description
Backward compatibility alias for earlier menu args naming.
Aliased Type§
pub struct MenuArgs {
pub placement: MenuPlacement,
pub offset: [Dp; 2],
pub width: DimensionValue,
pub max_height: Option<Px>,
pub shape: Shape,
pub shadow: Option<ShadowProps>,
pub container_color: Color,
pub scrim_color: Color,
pub close_on_background: bool,
pub close_on_escape: bool,
pub on_dismiss: Option<Arc<dyn Fn() + Send + Sync>>,
}Fields§
§placement: MenuPlacementHow the menu is aligned relative to the provided anchor.
offset: [Dp; 2]Additional x/y offset applied after placement relative to the anchor.
width: DimensionValueWidth behavior of the menu container. Defaults to the Material 112–280 dp range.
max_height: Option<Px>Maximum height of the menu before scrolling is required.
shape: ShapeShape of the menu container.
shadow: Option<ShadowProps>Optional shadow representing elevation. Defaults to a soft Material shadow.
container_color: ColorBackground color of the menu container.
scrim_color: ColorColor of the invisible background layer. Defaults to transparent (menus do not dim content).
close_on_background: boolWhether a background click should dismiss the menu.
close_on_escape: boolWhether pressing Escape dismisses the menu.
on_dismiss: Option<Arc<dyn Fn() + Send + Sync>>Optional callback invoked before the menu closes (background or Escape).