pub struct MenuThemeData {
pub style: Option<MenuStyle>,
pub submenu_icon: Option<WidgetStatePropertyRef<Option<WidgetRef>>>,
}Expand description
Defines the configuration of the submenus created by the SubmenuButton,
MenuBar, or MenuAnchor widgets.
Descendant widgets obtain the current MenuThemeData object using
MenuTheme::of.
Typically, a MenuThemeData is specified as part of the overall Theme
with ThemeData::menu_theme. Otherwise, MenuTheme can be used to configure
its own widget subtree.
All MenuThemeData properties are null by default. If any of these
properties are null, the menu bar will provide its own defaults.
See also:
ThemeData, which describes the overall theme for the application.MenuBarThemeData, which describes the theme for the menu bar itself in aMenuBarwidget.
Fields§
§style: Option<MenuStyle>The MenuStyle of a SubmenuButton menu.
Any values not set in the MenuStyle will use the menu default for that
property.
If provided, the widget replaces the default SubmenuButton arrow icon.
Resolves in the following states:
WidgetState::Disabled.WidgetState::Hovered.WidgetState::Focused.
Implementations§
Source§impl MenuThemeData
impl MenuThemeData
Sourcepub fn new() -> MenuThemeData
pub fn new() -> MenuThemeData
Creates a const set of properties used to configure MenuTheme.
Sourcepub fn style(self, style: MenuStyle) -> MenuThemeData
pub fn style(self, style: MenuStyle) -> MenuThemeData
Dart MenuThemeData(style:).
Dart MenuThemeData(submenuIcon:).
Sourcepub fn lerp(
a: Option<&MenuThemeData>,
b: Option<&MenuThemeData>,
t: f64,
) -> Option<MenuThemeData>
pub fn lerp( a: Option<&MenuThemeData>, b: Option<&MenuThemeData>, t: f64, ) -> Option<MenuThemeData>
Linearly interpolate between two menu button themes.
Trait Implementations§
Source§impl Clone for MenuThemeData
impl Clone for MenuThemeData
Source§impl Debug for MenuThemeData
impl Debug for MenuThemeData
Source§impl Default for MenuThemeData
impl Default for MenuThemeData
Source§impl Diagnosticable for MenuThemeData
impl Diagnosticable for MenuThemeData
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Object.runtimeType as diagnostics print it: the last segment of
the Rust type path, without generic arguments.Source§fn identity_hash(&self) -> u64
fn identity_hash(&self) -> u64
Object.hashCode as diagnostics print it: the object’s address.Source§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
Source§fn to_diagnostics_node(&self) -> DiagnosticableNode
fn to_diagnostics_node(&self) -> DiagnosticableNode
DiagnosticsNode::to_string_deep.Source§fn to_diagnostics_node_with(
&self,
name: Option<String>,
style: Option<DiagnosticsTreeStyle>,
) -> DiagnosticableNode
fn to_diagnostics_node_with( &self, name: Option<String>, style: Option<DiagnosticsTreeStyle>, ) -> DiagnosticableNode
toDiagnosticsNode(name:, style:).Source§fn to_string(&self) -> String
fn to_string(&self) -> String
toString: a single-line description with properties and no
children. Read moreSource§fn to_string_at(&self, min_level: DiagnosticLevel) -> String
fn to_string_at(&self, min_level: DiagnosticLevel) -> String
toString(minLevel:).