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:
PopupMenuItem, for the kinds of items that this widget divides.ShowMenu, a method to dynamically show a popup menu at a given location.PopupMenuButton, anIconButtonthat automatically shows a menu when it is tapped.
Fields§
§key: Option<KeyRef>§height: f64The 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
impl PopupMenuDivider
Sourcepub fn new() -> PopupMenuDivider
pub fn new() -> PopupMenuDivider
Creates a horizontal divider for a popup menu.
By default, the divider has a height of 16 logical pixels.
Sourcepub fn key(self, key: KeyRef) -> PopupMenuDivider
pub fn key(self, key: KeyRef) -> PopupMenuDivider
Dart PopupMenuDivider(key:).
Sourcepub fn height(self, height: f64) -> PopupMenuDivider
pub fn height(self, height: f64) -> PopupMenuDivider
Dart PopupMenuDivider(height:).
Sourcepub fn thickness(self, thickness: f64) -> PopupMenuDivider
pub fn thickness(self, thickness: f64) -> PopupMenuDivider
Dart PopupMenuDivider(thickness:).
Sourcepub fn indent(self, indent: f64) -> PopupMenuDivider
pub fn indent(self, indent: f64) -> PopupMenuDivider
Dart PopupMenuDivider(indent:).
Sourcepub fn end_indent(self, end_indent: f64) -> PopupMenuDivider
pub fn end_indent(self, end_indent: f64) -> PopupMenuDivider
Dart PopupMenuDivider(endIndent:).
Sourcepub fn radius(self, radius: impl Into<BorderRadiusGeometry>) -> PopupMenuDivider
pub fn radius(self, radius: impl Into<BorderRadiusGeometry>) -> PopupMenuDivider
Dart PopupMenuDivider(radius:).
Sourcepub fn color(self, color: Color) -> PopupMenuDivider
pub fn color(self, color: Color) -> PopupMenuDivider
Dart PopupMenuDivider(color:).
Trait Implementations§
Source§impl Debug for PopupMenuDivider
impl Debug for PopupMenuDivider
Source§impl Default for PopupMenuDivider
impl Default for PopupMenuDivider
Source§fn default() -> PopupMenuDivider
fn default() -> PopupMenuDivider
Source§impl<T: 'static> PopupMenuEntry<T> for PopupMenuDivider
impl<T: 'static> PopupMenuEntry<T> for PopupMenuDivider
Source§impl StatefulWidget for PopupMenuDivider
impl StatefulWidget for PopupMenuDivider
Source§type State = PopupMenuDividerState
type State = PopupMenuDividerState
Source§fn create_state(&self) -> PopupMenuDividerState
fn create_state(&self) -> PopupMenuDividerState
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
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)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
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 !RefUnwindSafe for PopupMenuDivider
impl !Send for PopupMenuDivider
impl !Sync for PopupMenuDivider
impl !UnwindSafe for PopupMenuDivider
impl Forget for PopupMenuDivider
impl Freeze for PopupMenuDivider
impl Move for PopupMenuDivider
impl Unpin for PopupMenuDivider
impl UnsafeUnpin for PopupMenuDivider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.