pub struct SearchBarTheme {
pub key: Option<KeyRef>,
pub data: SearchBarThemeData,
pub child: WidgetRef,
}Expand description
Applies a search bar theme to descendant SearchBar widgets.
Descendant widgets obtain the current theme’s SearchBarTheme object using
SearchBarTheme::of. When a widget uses SearchBarTheme::of, it is automatically
rebuilt if the theme later changes.
A search bar theme can be specified as part of the overall Material theme using
ThemeData::search_bar_theme.
See also:
SearchBarThemeData, which describes the actual configuration of a search bar theme.
Fields§
§key: Option<KeyRef>§data: SearchBarThemeDataSpecifies the default color, shape, and text style values for descendant SearchBar
widgets.
child: WidgetRefImplementations§
Source§impl SearchBarTheme
impl SearchBarTheme
Sourcepub fn new<K>(
data: SearchBarThemeData,
child: impl IntoWidget<K>,
) -> SearchBarTheme
pub fn new<K>( data: SearchBarThemeData, child: impl IntoWidget<K>, ) -> SearchBarTheme
Creates a search bar theme that controls the configurations for descendant
SearchBar widgets.
Sourcepub fn key(self, key: KeyRef) -> SearchBarTheme
pub fn key(self, key: KeyRef) -> SearchBarTheme
Dart SearchBarTheme(key:).
Sourcepub fn of(app: &mut App, context: BuildContext) -> SearchBarThemeData
pub fn of(app: &mut App, context: BuildContext) -> SearchBarThemeData
Retrieves the SearchBarThemeData from the closest ancestor SearchBarTheme.
If there is no enclosing SearchBarTheme widget, then
ThemeData::search_bar_theme is used.
Trait Implementations§
Source§impl Debug for SearchBarTheme
impl Debug for SearchBarTheme
Source§impl InheritedWidget for SearchBarTheme
impl InheritedWidget for SearchBarTheme
Source§fn update_should_notify(&self, old_widget: &SearchBarTheme) -> bool
fn update_should_notify(&self, old_widget: &SearchBarTheme) -> bool
Whether the framework should notify widgets that inherit from this widget. Read more
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
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_inherited_theme(&self) -> Option<&(dyn InheritedTheme + 'static)>
fn as_inherited_theme(&self) -> Option<&(dyn InheritedTheme + 'static)>
Dart’s
this is InheritedTheme: an inherited widget that is an InheritedTheme
answers with itself, which is what InheritedTheme::capture collects.Auto Trait Implementations§
impl !RefUnwindSafe for SearchBarTheme
impl !Send for SearchBarTheme
impl !Sync for SearchBarTheme
impl !UnwindSafe for SearchBarTheme
impl Forget for SearchBarTheme
impl Freeze for SearchBarThemewhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const RcInner<dyn WidgetStateProperty<Option<f64>>> is !null: Freeze,
PhantomData<RcInner<dyn WidgetStateProperty<Option<f64>>>>: Freeze,
*const RcInner<dyn WidgetStateProperty<Option<Color>>> is !null: Freeze,
PhantomData<RcInner<dyn WidgetStateProperty<Option<Color>>>>: Freeze,
*const RcInner<dyn WidgetStateProperty<Option<BorderSide>>> is !null: Freeze,
PhantomData<RcInner<dyn WidgetStateProperty<Option<BorderSide>>>>: Freeze,
*const RcInner<dyn WidgetStateProperty<Option<OutlinedBorderRef>>> is !null: Freeze,
PhantomData<RcInner<dyn WidgetStateProperty<Option<OutlinedBorderRef>>>>: Freeze,
*const RcInner<dyn WidgetStateProperty<Option<EdgeInsetsGeometry>>> is !null: Freeze,
PhantomData<RcInner<dyn WidgetStateProperty<Option<EdgeInsetsGeometry>>>>: Freeze,
*const RcInner<dyn WidgetStateProperty<Option<TextStyle>>> is !null: Freeze,
PhantomData<RcInner<dyn WidgetStateProperty<Option<TextStyle>>>>: Freeze,
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
impl Move for SearchBarTheme
impl Unpin for SearchBarThemewhere
Rc<dyn Key>: Unpin,
Rc<dyn WidgetStateProperty<Option<f64>>>: Unpin,
Rc<dyn WidgetStateProperty<Option<Color>>>: Unpin,
Rc<dyn WidgetStateProperty<Option<BorderSide>>>: Unpin,
Rc<dyn WidgetStateProperty<Option<OutlinedBorderRef>>>: Unpin,
Rc<dyn WidgetStateProperty<Option<EdgeInsetsGeometry>>>: Unpin,
Rc<dyn WidgetStateProperty<Option<TextStyle>>>: Unpin,
Rc<dyn Widget>: Unpin,
impl UnsafeUnpin for SearchBarThemewhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn WidgetStateProperty<Option<f64>>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn WidgetStateProperty<Option<f64>>>>: UnsafeUnpin,
*const RcInner<dyn WidgetStateProperty<Option<Color>>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn WidgetStateProperty<Option<Color>>>>: UnsafeUnpin,
*const RcInner<dyn WidgetStateProperty<Option<BorderSide>>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn WidgetStateProperty<Option<BorderSide>>>>: UnsafeUnpin,
*const RcInner<dyn WidgetStateProperty<Option<OutlinedBorderRef>>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn WidgetStateProperty<Option<OutlinedBorderRef>>>>: UnsafeUnpin,
*const RcInner<dyn WidgetStateProperty<Option<EdgeInsetsGeometry>>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn WidgetStateProperty<Option<EdgeInsetsGeometry>>>>: UnsafeUnpin,
*const RcInner<dyn WidgetStateProperty<Option<TextStyle>>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn WidgetStateProperty<Option<TextStyle>>>>: UnsafeUnpin,
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<W> IntoWidget<InheritedKind> for Wwhere
W: InheritedWidget,
impl<W> IntoWidget<InheritedKind> for Wwhere
W: InheritedWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
The widget as a tree node, made where this is called: its
creation_location.