pub struct DropdownMenuThemeData {
pub text_style: Option<TextStyle>,
pub input_decoration_theme: Option<InputDecorationThemeData>,
pub menu_style: Option<MenuStyle>,
pub disabled_color: Option<Color>,
}Expand description
Overrides the default values of visual properties for descendant DropdownMenu widgets.
Descendant widgets obtain the current DropdownMenuThemeData object with
DropdownMenuTheme::of. Instances of DropdownMenuThemeData can be customized with
DropdownMenuThemeData::copy_with.
Typically a DropdownMenuTheme is specified as part of the overall Theme with
ThemeData::dropdown_menu_theme.
All DropdownMenuThemeData properties are null by default. When null, the
DropdownMenu computes its own default values, typically based on the overall theme’s
ThemeData::color_scheme, ThemeData::text_theme, and ThemeData::icon_theme.
Fields§
§text_style: Option<TextStyle>Overrides the default value for DropdownMenu::text_style.
input_decoration_theme: Option<InputDecorationThemeData>The input decoration theme for the TextFields in a DropdownMenu.
If this is null, the DropdownMenu provides its own defaults.
Overrides the menu’s default style in a DropdownMenu.
Any values not set in the MenuStyle will use the menu default for that property.
disabled_color: Option<Color>The color used for disabled DropdownMenu.
If this is null, the DropdownMenu uses ColorScheme::on_surface with 0.38 opacity.
Implementations§
Source§impl DropdownMenuThemeData
impl DropdownMenuThemeData
Sourcepub fn new() -> DropdownMenuThemeData
pub fn new() -> DropdownMenuThemeData
Creates a DropdownMenuThemeData that can be used to override default properties in
a DropdownMenuTheme widget.
Sourcepub fn text_style(self, text_style: TextStyle) -> DropdownMenuThemeData
pub fn text_style(self, text_style: TextStyle) -> DropdownMenuThemeData
Dart DropdownMenuThemeData(textStyle:).
Sourcepub fn input_decoration_theme(
self,
input_decoration_theme: impl Into<InputDecorationThemeData>,
) -> DropdownMenuThemeData
pub fn input_decoration_theme( self, input_decoration_theme: impl Into<InputDecorationThemeData>, ) -> DropdownMenuThemeData
Dart DropdownMenuThemeData(inputDecorationTheme:).
Dart DropdownMenuThemeData(menuStyle:).
Sourcepub fn disabled_color(self, disabled_color: Color) -> DropdownMenuThemeData
pub fn disabled_color(self, disabled_color: Color) -> DropdownMenuThemeData
Dart DropdownMenuThemeData(disabledColor:).
Sourcepub fn copy_with(&self) -> DropdownMenuThemeData
pub fn copy_with(&self) -> DropdownMenuThemeData
Creates a copy of this object with the given fields replaced with the new values.
Sourcepub fn lerp(
a: Option<&DropdownMenuThemeData>,
b: Option<&DropdownMenuThemeData>,
t: f64,
) -> DropdownMenuThemeData
pub fn lerp( a: Option<&DropdownMenuThemeData>, b: Option<&DropdownMenuThemeData>, t: f64, ) -> DropdownMenuThemeData
Linearly interpolates between two dropdown menu themes.
Trait Implementations§
Source§impl Clone for DropdownMenuThemeData
impl Clone for DropdownMenuThemeData
Source§impl Debug for DropdownMenuThemeData
impl Debug for DropdownMenuThemeData
Source§impl Default for DropdownMenuThemeData
impl Default for DropdownMenuThemeData
Source§impl Diagnosticable for DropdownMenuThemeData
impl Diagnosticable for DropdownMenuThemeData
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:).Source§impl Display for DropdownMenuThemeData
impl Display for DropdownMenuThemeData
Source§impl DropdownMenuThemeDataGetters for DropdownMenuThemeData
impl DropdownMenuThemeDataGetters for DropdownMenuThemeData
super(...)
arguments a defaults struct keeps.Source§fn input_decoration_theme(
&self,
app: &mut App,
) -> Option<InputDecorationThemeData>
fn input_decoration_theme( &self, app: &mut App, ) -> Option<InputDecorationThemeData>
input_decoration_theme getter.menu_style getter.Source§fn copy_with(&self, app: &mut App) -> DropdownMenuThemeData
fn copy_with(&self, app: &mut App) -> DropdownMenuThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.