pub struct SearchViewThemeData {Show 13 fields
pub background_color: Option<Color>,
pub elevation: Option<f64>,
pub surface_tint_color: Option<Color>,
pub side: Option<AnyBorderSide>,
pub shape: Option<OutlinedBorderRef>,
pub header_height: Option<f64>,
pub header_text_style: Option<TextStyle>,
pub header_hint_style: Option<TextStyle>,
pub constraints: Option<BoxConstraints>,
pub padding: Option<EdgeInsetsGeometry>,
pub bar_padding: Option<EdgeInsetsGeometry>,
pub shrink_wrap: Option<bool>,
pub divider_color: Option<Color>,
}Expand description
Defines the configuration of the search views created by the SearchAnchor widget.
Descendant widgets obtain the current SearchViewThemeData object using
SearchViewTheme::of. Instances of SearchViewThemeData can be customized with
SearchViewThemeData::copy_with.
Typically a SearchViewThemeData is specified as part of the overall Theme with
ThemeData::search_view_theme.
All SearchViewThemeData properties are None by default. When null, the
SearchAnchor 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
SearchAnchor properties for details.
See also:
ThemeData, which describes the overall theme information for the application.SearchBarThemeData, which describes the theme for the search bar itself in aSearchBarwidget.
Fields§
§background_color: Option<Color>Overrides the default value of the SearchAnchor::view_background_color.
elevation: Option<f64>Overrides the default value of the SearchAnchor::view_elevation.
surface_tint_color: Option<Color>Overrides the default value surfaceTintColor of the SearchAnchor view.
side: Option<AnyBorderSide>Overrides the default value of the SearchAnchor::view_side.
shape: Option<OutlinedBorderRef>Overrides the default value of the SearchAnchor::view_shape.
header_height: Option<f64>Overrides the value of the SearchAnchor::header_height.
header_text_style: Option<TextStyle>Overrides the default value of the SearchAnchor::header_text_style.
header_hint_style: Option<TextStyle>Overrides the default value of the SearchAnchor::header_hint_style.
constraints: Option<BoxConstraints>Overrides the value of size constraints for the search view.
padding: Option<EdgeInsetsGeometry>Overrides the value of the padding for the search view.
bar_padding: Option<EdgeInsetsGeometry>Overrides the value of the padding for the search bar of the search view.
shrink_wrap: Option<bool>If true, the search view will be as tall as its content, or the available height if that is smaller.
divider_color: Option<Color>Overrides the default value of the SearchAnchor::divider_color.
Implementations§
Source§impl SearchViewThemeData
impl SearchViewThemeData
Sourcepub fn new() -> SearchViewThemeData
pub fn new() -> SearchViewThemeData
Creates a theme that can be used for ThemeData::search_view_theme.
Sourcepub fn background_color(self, background_color: Color) -> SearchViewThemeData
pub fn background_color(self, background_color: Color) -> SearchViewThemeData
Dart SearchViewThemeData(backgroundColor:).
Sourcepub fn elevation(self, elevation: f64) -> SearchViewThemeData
pub fn elevation(self, elevation: f64) -> SearchViewThemeData
Dart SearchViewThemeData(elevation:).
Sourcepub fn surface_tint_color(
self,
surface_tint_color: Color,
) -> SearchViewThemeData
pub fn surface_tint_color( self, surface_tint_color: Color, ) -> SearchViewThemeData
Dart SearchViewThemeData(surfaceTintColor:).
Sourcepub fn side(self, side: impl Into<AnyBorderSide>) -> SearchViewThemeData
pub fn side(self, side: impl Into<AnyBorderSide>) -> SearchViewThemeData
Dart SearchViewThemeData(side:).
Sourcepub fn shape(self, shape: impl Into<OutlinedBorderRef>) -> SearchViewThemeData
pub fn shape(self, shape: impl Into<OutlinedBorderRef>) -> SearchViewThemeData
Dart SearchViewThemeData(shape:).
Sourcepub fn header_height(self, header_height: f64) -> SearchViewThemeData
pub fn header_height(self, header_height: f64) -> SearchViewThemeData
Dart SearchViewThemeData(headerHeight:).
Sourcepub fn header_text_style(
self,
header_text_style: TextStyle,
) -> SearchViewThemeData
pub fn header_text_style( self, header_text_style: TextStyle, ) -> SearchViewThemeData
Dart SearchViewThemeData(headerTextStyle:).
Sourcepub fn header_hint_style(
self,
header_hint_style: TextStyle,
) -> SearchViewThemeData
pub fn header_hint_style( self, header_hint_style: TextStyle, ) -> SearchViewThemeData
Dart SearchViewThemeData(headerHintStyle:).
Sourcepub fn constraints(self, constraints: BoxConstraints) -> SearchViewThemeData
pub fn constraints(self, constraints: BoxConstraints) -> SearchViewThemeData
Dart SearchViewThemeData(constraints:).
Sourcepub fn padding(
self,
padding: impl Into<EdgeInsetsGeometry>,
) -> SearchViewThemeData
pub fn padding( self, padding: impl Into<EdgeInsetsGeometry>, ) -> SearchViewThemeData
Dart SearchViewThemeData(padding:).
Sourcepub fn bar_padding(
self,
bar_padding: impl Into<EdgeInsetsGeometry>,
) -> SearchViewThemeData
pub fn bar_padding( self, bar_padding: impl Into<EdgeInsetsGeometry>, ) -> SearchViewThemeData
Dart SearchViewThemeData(barPadding:).
Sourcepub fn shrink_wrap(self, shrink_wrap: bool) -> SearchViewThemeData
pub fn shrink_wrap(self, shrink_wrap: bool) -> SearchViewThemeData
Dart SearchViewThemeData(shrinkWrap:).
Sourcepub fn divider_color(self, divider_color: Color) -> SearchViewThemeData
pub fn divider_color(self, divider_color: Color) -> SearchViewThemeData
Dart SearchViewThemeData(dividerColor:).
Sourcepub fn copy_with(&self) -> SearchViewThemeData
pub fn copy_with(&self) -> SearchViewThemeData
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<&SearchViewThemeData>,
b: Option<&SearchViewThemeData>,
t: f64,
) -> Option<SearchViewThemeData>
pub fn lerp( a: Option<&SearchViewThemeData>, b: Option<&SearchViewThemeData>, t: f64, ) -> Option<SearchViewThemeData>
Linearly interpolate between two SearchViewThemeData.
Trait Implementations§
Source§impl Clone for SearchViewThemeData
impl Clone for SearchViewThemeData
Source§impl Debug for SearchViewThemeData
impl Debug for SearchViewThemeData
Source§impl Default for SearchViewThemeData
impl Default for SearchViewThemeData
Source§impl Diagnosticable for SearchViewThemeData
impl Diagnosticable for SearchViewThemeData
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 SearchViewThemeData
impl Display for SearchViewThemeData
Source§impl PartialEq for SearchViewThemeData
impl PartialEq for SearchViewThemeData
Source§impl SearchViewThemeDataGetters for SearchViewThemeData
impl SearchViewThemeDataGetters for SearchViewThemeData
Source§fn search_view_theme_data(&self) -> &SearchViewThemeData
fn search_view_theme_data(&self) -> &SearchViewThemeData
super(...)
arguments a defaults struct keeps.Source§fn surface_tint_color(&self, app: &mut App) -> Option<Color>
fn surface_tint_color(&self, app: &mut App) -> Option<Color>
surface_tint_color getter.Source§fn header_text_style(&self, app: &mut App) -> Option<TextStyle>
fn header_text_style(&self, app: &mut App) -> Option<TextStyle>
header_text_style getter.Source§fn header_hint_style(&self, app: &mut App) -> Option<TextStyle>
fn header_hint_style(&self, app: &mut App) -> Option<TextStyle>
header_hint_style getter.Source§fn constraints(&self, app: &mut App) -> Option<BoxConstraints>
fn constraints(&self, app: &mut App) -> Option<BoxConstraints>
constraints getter.Source§fn bar_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>
fn bar_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>
bar_padding getter.Source§fn copy_with(&self, app: &mut App) -> SearchViewThemeData
fn copy_with(&self, app: &mut App) -> SearchViewThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.