Skip to main content

SystemContextMenu

Trait SystemContextMenu 

Source
pub trait SystemContextMenu {
    // Required methods
    fn show(&self, target_rect: Rect, items: Option<&[SystemContextMenuItem]>);
    fn hide(&self);
}
Expand description

Flutter’s SystemContextMenu: the system’s own menu over a text selection.

Required Methods§

Source

fn show(&self, target_rect: Rect, items: Option<&[SystemContextMenuItem]>)

Shows the system context menu (Flutter’s ContextMenu.showSystemContextMenu).

items is None for the deprecated call that lets the platform pick default buttons. Built-in items are performed by the host; custom items are reported through crate::EmbedderClient::custom_context_menu_action.

Source

fn hide(&self)

Hides the system context menu (Flutter’s ContextMenu.hideSystemContextMenu).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§