pub struct BottomNavigationBarTheme {
pub key: Option<KeyRef>,
pub data: BottomNavigationBarThemeData,
pub child: WidgetRef,
}Expand description
Applies a bottom navigation bar theme to descendant BottomNavigationBar
widgets.
Descendant widgets obtain the current theme’s BottomNavigationBarTheme
object using BottomNavigationBarTheme::of. When a widget uses
BottomNavigationBarTheme::of, it is automatically rebuilt if the theme
later changes.
A bottom navigation theme can be specified as part of the overall Material
theme using ThemeData::bottom_navigation_bar_theme.
See also:
BottomNavigationBarThemeData, which describes the actual configuration of a bottom navigation bar theme.
Fields§
§key: Option<KeyRef>§data: BottomNavigationBarThemeDataThe properties used for all descendant BottomNavigationBar widgets.
child: WidgetRefImplementations§
Sourcepub fn new<K>(
data: BottomNavigationBarThemeData,
child: impl IntoWidget<K>,
) -> BottomNavigationBarTheme
pub fn new<K>( data: BottomNavigationBarThemeData, child: impl IntoWidget<K>, ) -> BottomNavigationBarTheme
Constructs a bottom navigation bar theme that configures all descendant
BottomNavigationBar widgets.
Sourcepub fn key(self, key: KeyRef) -> BottomNavigationBarTheme
pub fn key(self, key: KeyRef) -> BottomNavigationBarTheme
Dart BottomNavigationBarTheme(key:).
Sourcepub fn of(app: &mut App, context: BuildContext) -> BottomNavigationBarThemeData
pub fn of(app: &mut App, context: BuildContext) -> BottomNavigationBarThemeData
Returns the configuration data from the closest
BottomNavigationBarTheme ancestor. If there is no ancestor, it returns
ThemeData::bottom_navigation_bar_theme. Applications can assume that the
returned value will not be null.
Typical usage is as follows:
let theme = BottomNavigationBarTheme::of(app, context);Trait Implementations§
Source§fn update_should_notify(&self, old_widget: &BottomNavigationBarTheme) -> bool
fn update_should_notify(&self, old_widget: &BottomNavigationBarTheme) -> bool
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
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)>
this is InheritedTheme: an inherited widget that is an InheritedTheme
answers with itself, which is what InheritedTheme::capture collects.Auto Trait Implementations§
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
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>
creation_location.