pub struct SearchBarThemeData {
pub elevation: Option<WidgetStatePropertyRef<Option<f64>>>,
pub background_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub shadow_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub surface_tint_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub side: Option<WidgetStatePropertyRef<Option<BorderSide>>>,
pub shape: Option<WidgetStatePropertyRef<Option<OutlinedBorderRef>>>,
pub padding: Option<WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>>,
pub text_style: Option<WidgetStatePropertyRef<Option<TextStyle>>>,
pub hint_style: Option<WidgetStatePropertyRef<Option<TextStyle>>>,
pub constraints: Option<BoxConstraints>,
pub text_capitalization: Option<TextCapitalization>,
}Expand description
Defines default property values for descendant SearchBar widgets.
Descendant widgets obtain the current SearchBarThemeData object using
SearchBarTheme::of. Instances of SearchBarThemeData can be customized with
SearchBarThemeData::copy_with.
Typically a SearchBarThemeData is specified as part of the overall Theme with
ThemeData::search_bar_theme.
All SearchBarThemeData properties are None by default. When null, the SearchBar
will use the values from ThemeData if they exist, otherwise it will provide its own
defaults based on the overall Theme’s colorScheme. See the individual SearchBar
properties for details.
See also:
ThemeData, which describes the overall theme information for the application.SearchViewThemeData, which describes the theme for the search view of aSearchAnchor.
Fields§
§elevation: Option<WidgetStatePropertyRef<Option<f64>>>Overrides the default value of the SearchBar::elevation.
background_color: Option<WidgetStatePropertyRef<Option<Color>>>Overrides the default value of the SearchBar::background_color.
shadow_color: Option<WidgetStatePropertyRef<Option<Color>>>Overrides the default value of the SearchBar::shadow_color.
surface_tint_color: Option<WidgetStatePropertyRef<Option<Color>>>Overrides the default value of the SearchBar::surface_tint_color.
overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>Overrides the default value of the SearchBar::overlay_color.
side: Option<WidgetStatePropertyRef<Option<BorderSide>>>Overrides the default value of the SearchBar::side.
shape: Option<WidgetStatePropertyRef<Option<OutlinedBorderRef>>>Overrides the default value of the SearchBar::shape.
padding: Option<WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>>Overrides the default value for SearchBar::padding.
text_style: Option<WidgetStatePropertyRef<Option<TextStyle>>>Overrides the default value for SearchBar::text_style.
hint_style: Option<WidgetStatePropertyRef<Option<TextStyle>>>Overrides the default value for SearchBar::hint_style.
constraints: Option<BoxConstraints>Overrides the value of size constraints for SearchBar.
text_capitalization: Option<TextCapitalization>Overrides the value of SearchBar::text_capitalization.
Implementations§
Source§impl SearchBarThemeData
impl SearchBarThemeData
Sourcepub fn new() -> SearchBarThemeData
pub fn new() -> SearchBarThemeData
Creates a theme that can be used for ThemeData::search_bar_theme.
Sourcepub fn elevation(
self,
elevation: WidgetStatePropertyRef<Option<f64>>,
) -> SearchBarThemeData
pub fn elevation( self, elevation: WidgetStatePropertyRef<Option<f64>>, ) -> SearchBarThemeData
Dart SearchBarThemeData(elevation:).
Sourcepub fn background_color(
self,
background_color: WidgetStatePropertyRef<Option<Color>>,
) -> SearchBarThemeData
pub fn background_color( self, background_color: WidgetStatePropertyRef<Option<Color>>, ) -> SearchBarThemeData
Dart SearchBarThemeData(backgroundColor:).
Sourcepub fn shadow_color(
self,
shadow_color: WidgetStatePropertyRef<Option<Color>>,
) -> SearchBarThemeData
pub fn shadow_color( self, shadow_color: WidgetStatePropertyRef<Option<Color>>, ) -> SearchBarThemeData
Dart SearchBarThemeData(shadowColor:).
Sourcepub fn surface_tint_color(
self,
surface_tint_color: WidgetStatePropertyRef<Option<Color>>,
) -> SearchBarThemeData
pub fn surface_tint_color( self, surface_tint_color: WidgetStatePropertyRef<Option<Color>>, ) -> SearchBarThemeData
Dart SearchBarThemeData(surfaceTintColor:).
Sourcepub fn overlay_color(
self,
overlay_color: WidgetStatePropertyRef<Option<Color>>,
) -> SearchBarThemeData
pub fn overlay_color( self, overlay_color: WidgetStatePropertyRef<Option<Color>>, ) -> SearchBarThemeData
Dart SearchBarThemeData(overlayColor:).
Sourcepub fn side(
self,
side: WidgetStatePropertyRef<Option<BorderSide>>,
) -> SearchBarThemeData
pub fn side( self, side: WidgetStatePropertyRef<Option<BorderSide>>, ) -> SearchBarThemeData
Dart SearchBarThemeData(side:).
Sourcepub fn shape(
self,
shape: WidgetStatePropertyRef<Option<OutlinedBorderRef>>,
) -> SearchBarThemeData
pub fn shape( self, shape: WidgetStatePropertyRef<Option<OutlinedBorderRef>>, ) -> SearchBarThemeData
Dart SearchBarThemeData(shape:).
Sourcepub fn padding(
self,
padding: WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>,
) -> SearchBarThemeData
pub fn padding( self, padding: WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>, ) -> SearchBarThemeData
Dart SearchBarThemeData(padding:).
Sourcepub fn text_style(
self,
text_style: WidgetStatePropertyRef<Option<TextStyle>>,
) -> SearchBarThemeData
pub fn text_style( self, text_style: WidgetStatePropertyRef<Option<TextStyle>>, ) -> SearchBarThemeData
Dart SearchBarThemeData(textStyle:).
Sourcepub fn hint_style(
self,
hint_style: WidgetStatePropertyRef<Option<TextStyle>>,
) -> SearchBarThemeData
pub fn hint_style( self, hint_style: WidgetStatePropertyRef<Option<TextStyle>>, ) -> SearchBarThemeData
Dart SearchBarThemeData(hintStyle:).
Sourcepub fn constraints(self, constraints: BoxConstraints) -> SearchBarThemeData
pub fn constraints(self, constraints: BoxConstraints) -> SearchBarThemeData
Dart SearchBarThemeData(constraints:).
Sourcepub fn text_capitalization(
self,
text_capitalization: TextCapitalization,
) -> SearchBarThemeData
pub fn text_capitalization( self, text_capitalization: TextCapitalization, ) -> SearchBarThemeData
Dart SearchBarThemeData(textCapitalization:).
Sourcepub fn copy_with(&self) -> SearchBarThemeData
pub fn copy_with(&self) -> SearchBarThemeData
Creates a copy of this object but with the given fields replaced with the new values:
data.copy_with().elevation(..).
Sourcepub fn lerp(
a: Option<&SearchBarThemeData>,
b: Option<&SearchBarThemeData>,
t: f64,
) -> Option<SearchBarThemeData>
pub fn lerp( a: Option<&SearchBarThemeData>, b: Option<&SearchBarThemeData>, t: f64, ) -> Option<SearchBarThemeData>
Linearly interpolate between two SearchBarThemeData.
Trait Implementations§
Source§impl Clone for SearchBarThemeData
impl Clone for SearchBarThemeData
Source§impl Debug for SearchBarThemeData
impl Debug for SearchBarThemeData
Source§impl Default for SearchBarThemeData
impl Default for SearchBarThemeData
Source§impl Diagnosticable for SearchBarThemeData
impl Diagnosticable for SearchBarThemeData
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 SearchBarThemeData
impl Display for SearchBarThemeData
Source§impl PartialEq for SearchBarThemeData
impl PartialEq for SearchBarThemeData
Source§impl SearchBarThemeDataGetters for SearchBarThemeData
impl SearchBarThemeDataGetters for SearchBarThemeData
Source§fn search_bar_theme_data(&self) -> &SearchBarThemeData
fn search_bar_theme_data(&self) -> &SearchBarThemeData
super(...)
arguments a defaults struct keeps.Source§fn elevation(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<f64>>>
fn elevation( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<f64>>>
elevation getter.Source§fn background_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn background_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
background_color getter.Source§fn shadow_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn shadow_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
shadow_color getter.Source§fn surface_tint_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn surface_tint_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
surface_tint_color getter.Source§fn overlay_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn overlay_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
overlay_color getter.Source§fn side(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<BorderSide>>>
fn side( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<BorderSide>>>
side getter.Source§fn shape(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<OutlinedBorderRef>>>
fn shape( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<OutlinedBorderRef>>>
shape getter.Source§fn padding(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>>
fn padding( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>>
padding getter.Source§fn text_style(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<TextStyle>>>
fn text_style( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<TextStyle>>>
text_style getter.Source§fn hint_style(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<TextStyle>>>
fn hint_style( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<TextStyle>>>
hint_style getter.Source§fn constraints(&self, app: &mut App) -> Option<BoxConstraints>
fn constraints(&self, app: &mut App) -> Option<BoxConstraints>
constraints getter.Source§fn text_capitalization(&self, app: &mut App) -> Option<TextCapitalization>
fn text_capitalization(&self, app: &mut App) -> Option<TextCapitalization>
text_capitalization getter.Source§fn copy_with(&self, app: &mut App) -> SearchBarThemeData
fn copy_with(&self, app: &mut App) -> SearchBarThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.