Skip to main content

DropdownMenu

Struct DropdownMenu 

Source
pub struct DropdownMenu<T: 'static> {
Show 40 fields pub key: Option<KeyRef>, pub enabled: bool, pub width: Option<f64>, pub menu_height: Option<f64>, pub leading_icon: Option<WidgetRef>, pub trailing_icon: Option<WidgetRef>, pub show_trailing_icon: bool, pub trailing_icon_focus_node: Option<FocusNodeRef>, pub label: Option<WidgetRef>, pub hint_text: Option<String>, pub helper_text: Option<String>, pub error_text: Option<String>, pub selected_trailing_icon: Option<WidgetRef>, pub enable_filter: bool, pub enable_search: bool, pub keyboard_type: Option<TextInputType>, pub text_style: Option<TextStyle>, pub text_align: TextAlign, pub input_decoration_theme: Option<InputDecorationThemeData>, pub decoration_builder: Option<DropdownMenuDecorationBuilder>, pub menu_style: Option<MenuStyle>, pub controller: Option<TextEditingControllerRef>, pub initial_selection: Option<T>, pub on_selected: Option<ValueChanged<Option<T>>>, pub focus_node: Option<FocusNodeRef>, pub request_focus_on_tap: Option<bool>, pub select_only: bool, pub dropdown_menu_entries: Rc<[DropdownMenuEntry<T>]>, pub expanded_insets: Option<EdgeInsetsGeometry>, pub filter_callback: Option<FilterCallback<T>>, pub search_callback: Option<SearchCallback<T>>, pub input_formatters: Option<Vec<TextInputFormatterRef>>, pub alignment_offset: Option<Offset>, pub close_behavior: DropdownMenuCloseBehavior, pub max_lines: Option<i32>, pub text_input_action: Option<TextInputAction>, pub cursor_height: Option<f64>, pub restoration_id: Option<String>, pub menu_controller: Option<MenuControllerRef>, pub scroll_padding: EdgeInsets,
}
Expand description

A dropdown menu that can be opened from a TextField. The selected menu item is displayed in that field.

This widget is used to help people make a choice from a menu and put the selected item into the text input field. People can also filter the list based on the text input or search one item in the menu list.

The menu is composed of a list of DropdownMenuEntrys. People can provide information, such as: label, leading icon or trailing icon for each entry. The TextField will be updated based on the selection from the menu entries. The text field will stay empty if the selected entry is disabled.

When the dropdown menu has focus, it can be traversed by pressing the up or down key. During the process, the corresponding item will be highlighted and the text field will be updated. Disabled items will be skipped during traversal.

The menu can be scrollable if not all items in the list are displayed at once.

See also:

Fields§

§key: Option<KeyRef>§enabled: bool

Determine if the DropdownMenu is enabled.

Defaults to true.

§width: Option<f64>

Determine the width of the DropdownMenu.

If this is null, the width of the DropdownMenu will be the same as the width of the widest menu item plus the width of the leading/trailing icon.

§menu_height: Option<f64>

Determine the height of the menu.

If this is null, the menu will display as many items as possible on the screen.

§leading_icon: Option<WidgetRef>

An optional Icon at the front of the text input field.

Defaults to null. If this is not null, the menu items will have extra paddings to be aligned with the text in the text field.

§trailing_icon: Option<WidgetRef>

An optional icon at the end of the text field.

Defaults to an Icon with Icons::arrow_drop_down.

If show_trailing_icon is false, the trailing icon will not be shown.

§show_trailing_icon: bool

Specifies if the DropdownMenu should show the trailing_icon.

If trailing_icon is set, DropdownMenu will use that trailing icon, otherwise a default trailing icon will be created.

If show_trailing_icon is false, trailing_icon_focus_node must be null.

If a value is provided for decoration_builder and the resulting InputDecoration::suffix_icon is not null, show_trailing_icon has no effect.

Defaults to true.

§trailing_icon_focus_node: Option<FocusNodeRef>

Defines the FocusNode for the trailing icon.

If show_trailing_icon is false, trailing_icon_focus_node must be null.

If null, this widget will create its own FocusNode.

§label: Option<WidgetRef>

Optional widget that describes the input field.

When the input field is empty and unfocused, the label is displayed on top of the input field (i.e., at the same location on the screen where text may be entered in the input field). When the input field receives focus (or if the field is non-empty), the label moves above, either vertically adjacent to, or to the center of the input field.

Defaults to null.

§hint_text: Option<String>

Text that suggests what sort of input the field accepts.

Defaults to null;

§helper_text: Option<String>

Text that provides context about the DropdownMenu’s value, such as how the value will be used.

If non-null, the text is displayed below the input field, in the same location as error_text. If a non-null error_text value is specified then the helper text is not shown.

Defaults to null;

See also:

  • InputDecoration::helper_text, which is the text that provides context about the InputDecorator::child’s value.
§error_text: Option<String>

Text that appears below the input field and the border to show the error message.

If non-null, the border’s color animates to red and the helper_text is not shown.

Defaults to null;

See also:

  • InputDecoration::error_text, which is the text that appears below the InputDecorator::child and the border.
§selected_trailing_icon: Option<WidgetRef>

An optional icon at the end of the text field to indicate that the text field is pressed.

Defaults to an Icon with Icons::arrow_drop_up.

§enable_filter: bool

Determine if the menu list can be filtered by the text input.

Defaults to false.

§enable_search: bool

Determine if the first item that matches the text input can be highlighted.

Defaults to true as the search function could be commonly used.

§keyboard_type: Option<TextInputType>

The type of keyboard to use for editing the text.

Defaults to TextInputType::text.

§text_style: Option<TextStyle>

The text style for the TextField of the DropdownMenu;

Defaults to the overall theme’s TextTheme::body_large if the dropdown menu theme’s value is null.

§text_align: TextAlign

The text align for the TextField of the DropdownMenu.

Defaults to TextAlign::Start.

§input_decoration_theme: Option<InputDecorationThemeData>

Defines the default appearance of InputDecoration to show around the text field.

By default, shows a outlined text field.

§decoration_builder: Option<DropdownMenuDecorationBuilder>

The builder function used to create the InputDecoration passed to the text field.

If a value is provided for this property and the resulting InputDecoration::suffix_icon is null, a default IconButton is assigned as the suffix icon. This button’s icon will use trailing_icon and selected_trailing_icon if those are explicitly defined; otherwise, it defaults to Icons::arrow_drop_down for the collapsed state and Icons::arrow_drop_up for the expanded state.

If null, the default builder creates a decoration where:

§menu_style: Option<MenuStyle>

The MenuStyle that defines the visual attributes of the menu.

The default width of the menu is set to the width of the text field.

§controller: Option<TextEditingControllerRef>

Controls the text being edited or selected in the menu.

If null, this widget will create its own TextEditingController.

A TextEditingController can be provided to programmatically clear or modify the displayed selection. For example, calling TextEditingController::clear clears the text displayed in the dropdown menu.

When tracking the selected value in a state variable, calling TextEditingController::clear alongside updating the state variable to null is required to clear the displayed selection, as setting initial_selection to null does not clear the text field.

See also:

  • initial_selection, which sets the initial selection when the widget is first created.
§initial_selection: Option<T>

The value used for an initial selection.

This property sets the initial value of the dropdown menu when the widget is first created. If the value matches one of the dropdown_menu_entries, the corresponding label will be displayed in the text field.

Setting this to null on a rebuild does not clear the text field, because DropdownMenu only updates the text field when initial_selection changes to a value that matches one of the dropdown_menu_entries.

To programmatically clear or reset the selection, provide a controller and call TextEditingController::clear on it alongside resetting the state variable to null.

Defaults to null.

§on_selected: Option<ValueChanged<Option<T>>>

The callback is called when a selection is made.

The callback receives the selected entry’s value of type T when the user chooses an item. It may also be invoked with None to indicate that the selection was cleared / that no item was chosen.

Defaults to null. If this callback itself is null, the widget still updates the text field with the selected label.

§focus_node: Option<FocusNodeRef>

Defines the keyboard focus for this widget.

If null, this widget will create its own FocusNode.

If this is non-null, the behaviour of request_focus_on_tap is overridden by the FocusNode::can_request_focus property.

§request_focus_on_tap: Option<bool>

Determine if the dropdown menu requests focus and the on-screen virtual keyboard is shown in response to a touch event.

Ignored if a focus_node is explicitly provided (in which case, FocusNode::can_request_focus controls the behavior).

Defaults to null, which enables platform-specific behavior:

  • On mobile platforms, acts as if set to false; tapping on the text field and opening the menu will not cause a focus request and the virtual keyboard will not appear.

  • On desktop platforms, acts as if set to true; the dropdown takes the focus when activated.

Set this to true or false explicitly to override the default behavior.

§select_only: bool

Determines if the dropdown menu behaves as a ‘select’ component.

This is useful for mobile platforms where a dropdown menu is commonly used as a ‘select’ widget (i.e., the user can only select from the list, not edit the text field to search or filter).

When true, the inner text field is read-only.

If the text field is also focusable (see request_focus_on_tap), the following behaviors are also activated:

  • Pressing Enter when the menu is closed opens it.
  • The decoration reflects the focus state.

Defaults to false.

§dropdown_menu_entries: Rc<[DropdownMenuEntry<T>]>

Descriptions of the menu items in the DropdownMenu.

This is a required parameter. It is recommended that at least one DropdownMenuEntry is provided. If this is an empty list, the menu will be empty and only contain space for padding.

Dart compares the list by identity when the widget updates; so does this Rc.

§expanded_insets: Option<EdgeInsetsGeometry>

Defines the menu text field’s width to be equal to its parent’s width plus the horizontal width of the specified insets.

If this property is null, the width of the text field will be determined by the width of menu items or width. If this property is not null, the text field’s width will match the parent’s width plus the specified insets. If the value of this property is EdgeInsets::ZERO, the width of the text field will be the same as its parent’s width.

The insets’ top and bottom are ignored, only its left and right properties are used.

Defaults to null.

§filter_callback: Option<FilterCallback<T>>

When enable_filter is true, this callback is used to compute the list of filtered items.

Defaults to null. If this parameter is null and the enable_filter property is set to true, the default behavior will return a filtered list. The filtered list will contain items that match the text provided by the input field, with a case-insensitive comparison. When this is not null, enable_filter must be set to true.

§search_callback: Option<SearchCallback<T>>

When enable_search is true, this callback is used to compute the index of the search result to be highlighted.

Defaults to null. If this is null and enable_search is true, the default function will return the index of the first matching result which contains the contents of the text input field.

§input_formatters: Option<Vec<TextInputFormatterRef>>

Optional input validation and formatting overrides.

Formatters are run in the provided order when the user changes the text this widget contains. When this parameter changes, the new formatters will not be applied until the next time the user inserts or deletes text. Formatters don’t run when the text is changed programmatically via controller.

§alignment_offset: Option<Offset>

{@macro material_ui.MenuAnchor.alignmentOffset}

§close_behavior: DropdownMenuCloseBehavior

Defines the behavior for closing the dropdown menu when an item is selected.

The close behavior can be set to:

This property allows fine-grained control over the menu’s closing behavior, which can be useful for creating nested or complex menu structures.

Defaults to DropdownMenuCloseBehavior::All.

§max_lines: Option<i32>

Specifies the maximum number of lines the selected value can display in the DropdownMenu.

If the provided value is 1, then the text will not wrap, but will scroll horizontally instead. Defaults to 1.

If this is null, there is no limit to the number of lines, and the text container will start with enough vertical space for one line and automatically grow to accommodate additional lines as they are entered, up to the height of its constraints.

If this is not null, the provided value must be greater than zero. The text field will restrict the input to the given number of lines and take up enough horizontal space to accommodate that number of lines.

See also:

  • TextField::max_lines, which specifies the maximum number of lines the TextField can display.
§text_input_action: Option<TextInputAction>

{@macro material_ui.TextField.textInputAction}

§cursor_height: Option<f64>

{@macro flutter.widgets.editableText.cursorHeight}

§restoration_id: Option<String>

{@macro cupertino_ui.textfield.restorationId}

§menu_controller: Option<MenuControllerRef>

An optional controller that allows opening and closing of the menu from other widgets.

§scroll_padding: EdgeInsets

{@macro flutter.widgets.editableText.scrollPadding}

Implementations§

Source§

impl<T: Clone + PartialEq + 'static> DropdownMenu<T>

Source

pub fn new( dropdown_menu_entries: impl Into<Rc<[DropdownMenuEntry<T>]>>, ) -> DropdownMenu<T>

Creates a DropdownMenu.

The leading and trailing icons in the text field can be customized by using leading_icon, trailing_icon and selected_trailing_icon properties. They are passed down to the InputDecoration properties, and will override values in the InputDecoration::prefix_icon and InputDecoration::suffix_icon.

Except leading and trailing icons, the text field can be configured by the input_decoration_theme property. The menu can be configured by the menu_style.

Source

pub fn key(self, key: KeyRef) -> DropdownMenu<T>

Dart DropdownMenu(key:).

Source

pub fn enabled(self, enabled: bool) -> DropdownMenu<T>

Dart DropdownMenu(enabled:).

Source

pub fn width(self, width: f64) -> DropdownMenu<T>

Dart DropdownMenu(width:).

Source

pub fn menu_height(self, menu_height: f64) -> DropdownMenu<T>

Dart DropdownMenu(menuHeight:).

Source

pub fn leading_icon<K>( self, leading_icon: impl IntoWidget<K>, ) -> DropdownMenu<T>

Dart DropdownMenu(leadingIcon:).

Source

pub fn trailing_icon<K>( self, trailing_icon: impl IntoWidget<K>, ) -> DropdownMenu<T>

Dart DropdownMenu(trailingIcon:).

Source

pub fn show_trailing_icon(self, show_trailing_icon: bool) -> DropdownMenu<T>

Dart DropdownMenu(showTrailingIcon:).

Source

pub fn trailing_icon_focus_node( self, trailing_icon_focus_node: FocusNodeRef, ) -> DropdownMenu<T>

Dart DropdownMenu(trailingIconFocusNode:).

Source

pub fn label<K>(self, label: impl IntoWidget<K>) -> DropdownMenu<T>

Dart DropdownMenu(label:).

Source

pub fn hint_text(self, hint_text: impl Into<String>) -> DropdownMenu<T>

Dart DropdownMenu(hintText:).

Source

pub fn helper_text(self, helper_text: impl Into<String>) -> DropdownMenu<T>

Dart DropdownMenu(helperText:).

Source

pub fn error_text(self, error_text: impl Into<String>) -> DropdownMenu<T>

Dart DropdownMenu(errorText:).

Source

pub fn selected_trailing_icon<K>( self, selected_trailing_icon: impl IntoWidget<K>, ) -> DropdownMenu<T>

Dart DropdownMenu(selectedTrailingIcon:).

Source

pub fn enable_filter(self, enable_filter: bool) -> DropdownMenu<T>

Dart DropdownMenu(enableFilter:).

Dart DropdownMenu(enableSearch:).

Source

pub fn keyboard_type(self, keyboard_type: TextInputType) -> DropdownMenu<T>

Dart DropdownMenu(keyboardType:).

Source

pub fn text_style(self, text_style: TextStyle) -> DropdownMenu<T>

Dart DropdownMenu(textStyle:).

Source

pub fn text_align(self, text_align: TextAlign) -> DropdownMenu<T>

Dart DropdownMenu(textAlign:).

Source

pub fn input_decoration_theme( self, input_decoration_theme: impl Into<InputDecorationThemeData>, ) -> DropdownMenu<T>

Dart DropdownMenu(inputDecorationTheme:).

Source

pub fn decoration_builder( self, decoration_builder: impl Fn(&mut App, BuildContext, AnyMenuController) -> InputDecoration + 'static, ) -> DropdownMenu<T>

Dart DropdownMenu(decorationBuilder:).

Source

pub fn menu_style(self, menu_style: MenuStyle) -> DropdownMenu<T>

Dart DropdownMenu(menuStyle:).

Source

pub fn controller(self, controller: TextEditingControllerRef) -> DropdownMenu<T>

Dart DropdownMenu(controller:).

Source

pub fn initial_selection(self, initial_selection: T) -> DropdownMenu<T>

Dart DropdownMenu(initialSelection:).

Source

pub fn on_selected( self, on_selected: impl Fn(&mut App, Option<T>) + 'static, ) -> DropdownMenu<T>

Dart DropdownMenu(onSelected:).

Source

pub fn focus_node(self, focus_node: FocusNodeRef) -> DropdownMenu<T>

Dart DropdownMenu(focusNode:).

Source

pub fn request_focus_on_tap(self, request_focus_on_tap: bool) -> DropdownMenu<T>

Dart DropdownMenu(requestFocusOnTap:).

Source

pub fn select_only(self, select_only: bool) -> DropdownMenu<T>

Dart DropdownMenu(selectOnly:).

Source

pub fn expanded_insets( self, expanded_insets: impl Into<EdgeInsetsGeometry>, ) -> DropdownMenu<T>

Dart DropdownMenu(expandedInsets:).

Source

pub fn filter_callback( self, filter_callback: impl Fn(&mut App, &[DropdownMenuEntry<T>], &str) -> Vec<DropdownMenuEntry<T>> + 'static, ) -> DropdownMenu<T>

Dart DropdownMenu(filterCallback:).

Source

pub fn search_callback( self, search_callback: impl Fn(&mut App, &[DropdownMenuEntry<T>], &str) -> Option<usize> + 'static, ) -> DropdownMenu<T>

Dart DropdownMenu(searchCallback:).

Source

pub fn input_formatters( self, input_formatters: Vec<TextInputFormatterRef>, ) -> DropdownMenu<T>

Dart DropdownMenu(inputFormatters:).

Source

pub fn alignment_offset(self, alignment_offset: Offset) -> DropdownMenu<T>

Dart DropdownMenu(alignmentOffset:).

Source

pub fn close_behavior( self, close_behavior: DropdownMenuCloseBehavior, ) -> DropdownMenu<T>

Dart DropdownMenu(closeBehavior:).

Source

pub fn max_lines(self, max_lines: Option<i32>) -> DropdownMenu<T>

Dart DropdownMenu(maxLines:).

Source

pub fn text_input_action( self, text_input_action: TextInputAction, ) -> DropdownMenu<T>

Dart DropdownMenu(textInputAction:).

Source

pub fn cursor_height(self, cursor_height: f64) -> DropdownMenu<T>

Dart DropdownMenu(cursorHeight:).

Source

pub fn restoration_id( self, restoration_id: impl Into<String>, ) -> DropdownMenu<T>

Dart DropdownMenu(restorationId:).

Source

pub fn menu_controller( self, menu_controller: MenuControllerRef, ) -> DropdownMenu<T>

Dart DropdownMenu(menuController:).

Source

pub fn scroll_padding(self, scroll_padding: EdgeInsets) -> DropdownMenu<T>

Dart DropdownMenu(scrollPadding:).

Trait Implementations§

Source§

impl<T: Clone + 'static> Clone for DropdownMenu<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: 'static> Debug for DropdownMenu<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Clone + PartialEq + 'static> StatefulWidget for DropdownMenu<T>

Source§

type State = DropdownMenuState<T>

The state this widget creates.
Source§

fn key(&self) -> Option<&KeyRef>

Source§

fn debug_check_constructor(&self)

Source§

fn create_state(&self) -> DropdownMenuState<T>

Creates the mutable state for this widget at a given location in the tree. Read more
Source§

fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )

Dart’s debugFillProperties: the properties a dump shows for this widget, in Dart’s order. Dart’s Widget base only sets the dense tree style, which the framework does.
Source§

fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>

Source§

fn type_name(&self) -> &'static str

See Widget::type_name. A stateful form another widget kind becomes (an animated or status transition widget) names the widget it wraps.

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for DropdownMenu<T>

§

impl<T> !Send for DropdownMenu<T>

§

impl<T> !Sync for DropdownMenu<T>

§

impl<T> !UnwindSafe for DropdownMenu<T>

§

impl<T> Forget for DropdownMenu<T>

§

impl<T> Freeze for DropdownMenu<T>
where *const RcInner<dyn Key> is !null: Freeze, PhantomData<RcInner<dyn Key>>: Freeze, *const RcInner<dyn Widget> is !null: Freeze, PhantomData<RcInner<dyn Widget>>: Freeze, NonZero<u32>: Freeze, &'static FocusNodeVTable: Freeze, *const RcInner<Keep> is !null: Freeze, PhantomData<RcInner<Keep>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, &'static dyn ColorExtension: Freeze, *const RcInner<dyn ColorExtension> is !null: Freeze, PhantomData<RcInner<dyn ColorExtension>>: Freeze, PhantomData<String>: Freeze, *const RcInner<Paint> is !null: Freeze, PhantomData<RcInner<Paint>>: Freeze, PhantomData<Shadow>: Freeze, PhantomData<FontFeature>: Freeze, PhantomData<FontVariation>: Freeze, *const RcInner<dyn TextStyleExtension> is !null: Freeze, PhantomData<RcInner<dyn TextStyleExtension>>: Freeze, *const RcInner<dyn BorderSideExtension> is !null: Freeze, PhantomData<RcInner<dyn BorderSideExtension>>: Freeze, *const RcInner<dyn InputBorder> is !null: Freeze, PhantomData<RcInner<dyn InputBorder>>: Freeze, *const RcInner<dyn Fn(&mut App, AnyElement, AnyMenuController) -> InputDecoration> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, AnyMenuController) -> InputDecoration>>: Freeze, *const RcInner<dyn WidgetStateProperty<Option<Color>>> is !null: Freeze, PhantomData<RcInner<dyn WidgetStateProperty<Option<Color>>>>: Freeze, *const RcInner<dyn WidgetStateProperty<Option<f64>>> is !null: Freeze, PhantomData<RcInner<dyn WidgetStateProperty<Option<f64>>>>: Freeze, *const RcInner<dyn WidgetStateProperty<Option<EdgeInsetsGeometry>>> is !null: Freeze, PhantomData<RcInner<dyn WidgetStateProperty<Option<EdgeInsetsGeometry>>>>: Freeze, *const RcInner<dyn WidgetStateProperty<Option<Size>>> is !null: Freeze, PhantomData<RcInner<dyn WidgetStateProperty<Option<Size>>>>: Freeze, *const RcInner<dyn WidgetStateProperty<Option<BorderSide>>> is !null: Freeze, PhantomData<RcInner<dyn WidgetStateProperty<Option<BorderSide>>>>: Freeze, *const RcInner<dyn WidgetStateProperty<Option<OutlinedBorderRef>>> is !null: Freeze, PhantomData<RcInner<dyn WidgetStateProperty<Option<OutlinedBorderRef>>>>: Freeze, *const RcInner<dyn WidgetStateProperty<Option<Rc<dyn MouseCursor>>>> is !null: Freeze, PhantomData<RcInner<dyn WidgetStateProperty<Option<Rc<dyn MouseCursor>>>>>: Freeze, &'static TextEditingControllerVTable: Freeze, T: Freeze, *const RcInner<dyn Fn(&mut App, Option<T>)> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, Option<T>)>>: Freeze, *const RcInner<[DropdownMenuEntry<T>]> is !null: Freeze, PhantomData<RcInner<[DropdownMenuEntry<T>]>>: Freeze, *const RcInner<dyn Fn(&mut App, &[DropdownMenuEntry<T>], &str) -> Vec<DropdownMenuEntry<T>>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, &[DropdownMenuEntry<T>], &str) -> Vec<DropdownMenuEntry<T>>>>: Freeze, *const RcInner<dyn Fn(&mut App, &[DropdownMenuEntry<T>], &str) -> Option<usize>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, &[DropdownMenuEntry<T>], &str) -> Option<usize>>>: Freeze, PhantomData<TextInputFormatterRef>: Freeze, &'static MenuControllerVTable: Freeze,

§

impl<T> Move for DropdownMenu<T>

§

impl<T> Unpin for DropdownMenu<T>

§

impl<T> UnsafeUnpin for DropdownMenu<T>
where *const RcInner<dyn Key> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Key>>: UnsafeUnpin, *const RcInner<dyn Widget> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Widget>>: UnsafeUnpin, NonZeroU32Inner: UnsafeUnpin, &'static FocusNodeVTable: UnsafeUnpin, *const RcInner<Keep> is !null: UnsafeUnpin, PhantomData<RcInner<Keep>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, &'static dyn ColorExtension: UnsafeUnpin, *const RcInner<dyn ColorExtension> is !null: UnsafeUnpin, PhantomData<RcInner<dyn ColorExtension>>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, *const RcInner<Paint> is !null: UnsafeUnpin, PhantomData<RcInner<Paint>>: UnsafeUnpin, PhantomData<Shadow>: UnsafeUnpin, PhantomData<FontFeature>: UnsafeUnpin, PhantomData<FontVariation>: UnsafeUnpin, *const RcInner<dyn TextStyleExtension> is !null: UnsafeUnpin, PhantomData<RcInner<dyn TextStyleExtension>>: UnsafeUnpin, *const RcInner<dyn BorderSideExtension> is !null: UnsafeUnpin, PhantomData<RcInner<dyn BorderSideExtension>>: UnsafeUnpin, *const RcInner<dyn InputBorder> is !null: UnsafeUnpin, PhantomData<RcInner<dyn InputBorder>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, AnyElement, AnyMenuController) -> InputDecoration> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, AnyMenuController) -> InputDecoration>>: UnsafeUnpin, *const RcInner<dyn WidgetStateProperty<Option<Color>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn WidgetStateProperty<Option<Color>>>>: UnsafeUnpin, *const RcInner<dyn WidgetStateProperty<Option<f64>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn WidgetStateProperty<Option<f64>>>>: UnsafeUnpin, *const RcInner<dyn WidgetStateProperty<Option<EdgeInsetsGeometry>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn WidgetStateProperty<Option<EdgeInsetsGeometry>>>>: UnsafeUnpin, *const RcInner<dyn WidgetStateProperty<Option<Size>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn WidgetStateProperty<Option<Size>>>>: UnsafeUnpin, *const RcInner<dyn WidgetStateProperty<Option<BorderSide>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn WidgetStateProperty<Option<BorderSide>>>>: UnsafeUnpin, *const RcInner<dyn WidgetStateProperty<Option<OutlinedBorderRef>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn WidgetStateProperty<Option<OutlinedBorderRef>>>>: UnsafeUnpin, *const RcInner<dyn WidgetStateProperty<Option<Rc<dyn MouseCursor>>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn WidgetStateProperty<Option<Rc<dyn MouseCursor>>>>>: UnsafeUnpin, &'static TextEditingControllerVTable: UnsafeUnpin, T: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, Option<T>)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, Option<T>)>>: UnsafeUnpin, *const RcInner<[DropdownMenuEntry<T>]> is !null: UnsafeUnpin, PhantomData<RcInner<[DropdownMenuEntry<T>]>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, &[DropdownMenuEntry<T>], &str) -> Vec<DropdownMenuEntry<T>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, &[DropdownMenuEntry<T>], &str) -> Vec<DropdownMenuEntry<T>>>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, &[DropdownMenuEntry<T>], &str) -> Option<usize>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, &[DropdownMenuEntry<T>], &str) -> Option<usize>>>: UnsafeUnpin, PhantomData<TextInputFormatterRef>: UnsafeUnpin, &'static MenuControllerVTable: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<W> IntoWidget<StatefulKind> for W
where W: StatefulWidget,

Source§

fn into_widget(self) -> Rc<dyn Widget>

The widget as a tree node, made where this is called: its creation_location.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>