Skip to main content

PopupMenuDivider

Struct PopupMenuDivider 

Source
pub struct PopupMenuDivider {
    pub key: Option<KeyRef>,
    pub height: f64,
    pub thickness: Option<f64>,
    pub indent: Option<f64>,
    pub end_indent: Option<f64>,
    pub radius: Option<BorderRadiusGeometry>,
    pub color: Option<Color>,
}
Expand description

A horizontal divider in a Material Design popup menu.

This widget adapts the Divider for use in popup menus.

It is a PopupMenuEntry of every T, as Dart’s PopupMenuEntry<Never> is.

See also:

Fields§

§key: Option<KeyRef>§height: f64

The height of the divider entry.

Defaults to 16 pixels.

§thickness: Option<f64>

The thickness of the divider line.

If this is None, then the DividerThemeData::thickness is used. If that is also None, then this defaults to 1.0.

§indent: Option<f64>

The amount of empty space to the leading edge of the divider line.

If this is None, then the DividerThemeData::indent is used. If that is also None, then this defaults to 0.0.

§end_indent: Option<f64>

The amount of empty space to the trailing edge of the divider line.

If this is None, then the DividerThemeData::end_indent is used. If that is also None, then this defaults to 0.0.

§radius: Option<BorderRadiusGeometry>

The amount of radius for the border of the divider line.

If this is None, then the default radius of Divider will be used.

§color: Option<Color>

The color of the divider line.

If this is None, then the DividerThemeData::color is used. If that is also None, then ColorScheme::outline_variant is used.

Implementations§

Source§

impl PopupMenuDivider

Source

pub fn new() -> PopupMenuDivider

Creates a horizontal divider for a popup menu.

By default, the divider has a height of 16 logical pixels.

Source

pub fn key(self, key: KeyRef) -> PopupMenuDivider

Dart PopupMenuDivider(key:).

Source

pub fn height(self, height: f64) -> PopupMenuDivider

Dart PopupMenuDivider(height:).

Source

pub fn thickness(self, thickness: f64) -> PopupMenuDivider

Dart PopupMenuDivider(thickness:).

Source

pub fn indent(self, indent: f64) -> PopupMenuDivider

Dart PopupMenuDivider(indent:).

Source

pub fn end_indent(self, end_indent: f64) -> PopupMenuDivider

Dart PopupMenuDivider(endIndent:).

Source

pub fn radius(self, radius: impl Into<BorderRadiusGeometry>) -> PopupMenuDivider

Dart PopupMenuDivider(radius:).

Source

pub fn color(self, color: Color) -> PopupMenuDivider

Dart PopupMenuDivider(color:).

Trait Implementations§

Source§

impl Debug for PopupMenuDivider

Source§

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

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

impl Default for PopupMenuDivider

Source§

fn default() -> PopupMenuDivider

Returns the “default value” for a type. Read more
Source§

impl<T: 'static> PopupMenuEntry<T> for PopupMenuDivider

Source§

fn height(&self) -> f64

The amount of vertical space occupied by this entry. Read more
Source§

fn represents(&self, _value: Option<&T>) -> bool

Whether this entry represents a particular value. Read more
Source§

impl StatefulWidget for PopupMenuDivider

Source§

type State = PopupMenuDividerState

The state this widget creates.
Source§

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

Source§

fn create_state(&self) -> PopupMenuDividerState

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 debug_check_constructor(&self)

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§

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> 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, 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>