pub struct NavigationIndicator {
pub key: Option<KeyRef>,
pub animation: AnimationRef<f64>,
pub color: Option<Color>,
pub width: f64,
pub height: f64,
pub border_radius: BorderRadius,
pub shape: Option<ShapeBorderRef>,
}Expand description
Selection Indicator for the Material 3 NavigationBar and NavigationRail
components.
When animation is 0, the indicator is not present. As
animation grows from 0 to 1, the indicator scales in on the x axis.
Used in a Stack widget behind the icons in the Material 3 Navigation Bar
to illuminate the selected destination.
Fields§
§key: Option<KeyRef>§animation: AnimationRef<f64>Determines the scale of the indicator.
When animation is 0, the indicator is not present. The indicator
scales in as animation grows from 0 to 1.
color: Option<Color>The fill color of this indicator.
If null, defaults to ColorScheme::secondary.
width: f64The width of this indicator.
Defaults to 64.
height: f64The height of this indicator.
Defaults to 32.
border_radius: BorderRadiusThe border radius of the shape of the indicator.
This is used to create a RoundedRectangleBorder shape for the indicator.
This is ignored if shape is non-null.
Defaults to BorderRadius.circular(16).
shape: Option<ShapeBorderRef>The shape of the indicator.
If non-null this is used as the shape used to draw the background
of the indicator. If null then a RoundedRectangleBorder with the
border_radius is used.
Implementations§
Sourcepub fn new(animation: AnimationRef<f64>) -> NavigationIndicator
pub fn new(animation: AnimationRef<f64>) -> NavigationIndicator
Builds an indicator, usually used in a stack behind the icon of a navigation bar destination.
Sourcepub fn key(self, key: KeyRef) -> NavigationIndicator
pub fn key(self, key: KeyRef) -> NavigationIndicator
Dart NavigationIndicator(key:).
Sourcepub fn color(self, color: Color) -> NavigationIndicator
pub fn color(self, color: Color) -> NavigationIndicator
Dart NavigationIndicator(color:).
Sourcepub fn width(self, width: f64) -> NavigationIndicator
pub fn width(self, width: f64) -> NavigationIndicator
Dart NavigationIndicator(width:).
Sourcepub fn height(self, height: f64) -> NavigationIndicator
pub fn height(self, height: f64) -> NavigationIndicator
Dart NavigationIndicator(height:).
Sourcepub fn border_radius(self, border_radius: BorderRadius) -> NavigationIndicator
pub fn border_radius(self, border_radius: BorderRadius) -> NavigationIndicator
Dart NavigationIndicator(borderRadius:).
Sourcepub fn shape(self, shape: impl Into<ShapeBorderRef>) -> NavigationIndicator
pub fn shape(self, shape: impl Into<ShapeBorderRef>) -> NavigationIndicator
Dart NavigationIndicator(shape:).
Trait Implementations§
Source§fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef
fn build(&self, _app: &mut App, _context: BuildContext) -> WidgetRef
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 debug_check_constructor(&self)
fn debug_check_constructor(&self)
Source§fn as_preferred_size_widget(
&self,
) -> Option<&(dyn PreferredSizeWidget + 'static)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
this is PreferredSizeWidget: a widget that implements PreferredSizeWidget
answers with itself, which is what a parent asking an erased child for its preferred
size reads.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<StatelessKind> for Wwhere
W: StatelessWidget,
impl<W> IntoWidget<StatelessKind> for Wwhere
W: StatelessWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.