pub struct NavigationRailDestination {
pub icon: WidgetRef,
pub selected_icon: WidgetRef,
pub indicator_color: Option<Color>,
pub indicator_shape: Option<ShapeBorderRef>,
pub label: WidgetRef,
pub padding: Option<EdgeInsetsGeometry>,
pub disabled: bool,
}Expand description
Fields§
§icon: WidgetRefThe icon of the destination.
Typically the icon is an Icon or an ImageIcon widget. If another type
of widget is provided then it should configure itself to match the current
IconTheme size and color.
If selected_icon is provided, this will only be displayed
when the destination is not selected.
To make the NavigationRail more accessible, consider choosing an
icon with a stroked and filled version, such as Icons::cloud and
Icons::cloud_queue. The icon should be set to the stroked version
and selected_icon to the filled version.
selected_icon: WidgetRefAn alternative icon displayed when this destination is selected.
If this icon is not provided, the NavigationRail will display
icon in either state. The size, color, and opacity of the
NavigationRail::selected_icon_theme will still apply.
See also:
NavigationRailDestination::icon, for a description of how to pair icons.
indicator_color: Option<Color>The color of the indicator_shape when this destination is
selected.
indicator_shape: Option<ShapeBorderRef>The shape of the selection indicator.
label: WidgetRefThe label for the destination.
The label must be provided when used with the NavigationRail. When the
NavigationRail::label_type is NavigationRailLabelType::None, the label is
still used for semantics, and may still be used if
NavigationRail::extended is true.
padding: Option<EdgeInsetsGeometry>The amount of space to inset the destination item.
disabled: boolIndicates that this destination is inaccessible.
Implementations§
Sourcepub fn new<I, L>(
icon: impl IntoWidget<I>,
label: impl IntoWidget<L>,
) -> NavigationRailDestination
pub fn new<I, L>( icon: impl IntoWidget<I>, label: impl IntoWidget<L>, ) -> NavigationRailDestination
Creates a destination that is used with NavigationRail::destinations.
When the NavigationRail::label_type is NavigationRailLabelType::None, the
label is still used for semantics, and may still be used if
NavigationRail::extended is true.
Sourcepub fn selected_icon<K>(
self,
selected_icon: impl IntoWidget<K>,
) -> NavigationRailDestination
pub fn selected_icon<K>( self, selected_icon: impl IntoWidget<K>, ) -> NavigationRailDestination
Dart NavigationRailDestination(selectedIcon:).
Sourcepub fn indicator_color(
self,
indicator_color: Color,
) -> NavigationRailDestination
pub fn indicator_color( self, indicator_color: Color, ) -> NavigationRailDestination
Dart NavigationRailDestination(indicatorColor:).
Sourcepub fn indicator_shape(
self,
indicator_shape: impl Into<ShapeBorderRef>,
) -> NavigationRailDestination
pub fn indicator_shape( self, indicator_shape: impl Into<ShapeBorderRef>, ) -> NavigationRailDestination
Dart NavigationRailDestination(indicatorShape:).
Sourcepub fn padding(
self,
padding: impl Into<EdgeInsetsGeometry>,
) -> NavigationRailDestination
pub fn padding( self, padding: impl Into<EdgeInsetsGeometry>, ) -> NavigationRailDestination
Dart NavigationRailDestination(padding:).
Sourcepub fn disabled(self, disabled: bool) -> NavigationRailDestination
pub fn disabled(self, disabled: bool) -> NavigationRailDestination
Dart NavigationRailDestination(disabled:).