pub struct NavigationSuiteScaffold {
pub key: Option<KeyRef>,
pub destinations: Vec<NavigationSuiteDestination>,
pub selected_index: usize,
pub on_destination_selected: Option<ValueChanged<usize>>,
pub navigation_suite_type: Option<NavigationSuiteType>,
pub primary_action: Option<WidgetRef>,
pub navigation_suite_colors: NavigationSuiteColors,
pub navigation_item_vertical_arrangement: NavigationItemVerticalArrangement,
pub container_color: Option<Color>,
pub content: WidgetRef,
}Expand description
Content beside a bar, rail or drawer built from one list of destinations.
Fields§
§key: Option<KeyRef>The scaffold’s key.
destinations: Vec<NavigationSuiteDestination>The destinations, in order.
selected_index: usizeThe selected destination.
on_destination_selected: Option<ValueChanged<usize>>Called with a selected destination’s index.
What to show the destinations in; None follows the window’s size class.
primary_action: Option<WidgetRef>The rail’s leading widget, the drawer’s header, or a button above the bar’s end.
The background of each navigation widget.
Where a rail’s destinations sit along its height.
container_color: Option<Color>The background behind the navigation widget and the content; None is the scheme’s
surface, Compose’s colorScheme.background.
content: WidgetRefThe content beside the navigation widget.
Implementations§
Sourcepub fn new<K>(
destinations: Vec<NavigationSuiteDestination>,
content: impl IntoWidget<K>,
) -> NavigationSuiteScaffold
pub fn new<K>( destinations: Vec<NavigationSuiteDestination>, content: impl IntoWidget<K>, ) -> NavigationSuiteScaffold
Creates a suite around content.
Sourcepub fn selected_index(self, selected_index: usize) -> NavigationSuiteScaffold
pub fn selected_index(self, selected_index: usize) -> NavigationSuiteScaffold
Sets the selected destination.
Sourcepub fn on_destination_selected(
self,
on_destination_selected: ValueChanged<usize>,
) -> NavigationSuiteScaffold
pub fn on_destination_selected( self, on_destination_selected: ValueChanged<usize>, ) -> NavigationSuiteScaffold
Sets the callback for a selected destination.
Sets what to show the destinations in.
Sourcepub fn primary_action<K>(
self,
primary_action: impl IntoWidget<K>,
) -> NavigationSuiteScaffold
pub fn primary_action<K>( self, primary_action: impl IntoWidget<K>, ) -> NavigationSuiteScaffold
Sets the rail’s leading widget, the drawer’s header, or the button above the bar’s end.
Sets the background of each navigation widget.
Sets where a rail’s destinations sit along its height.
Sourcepub fn container_color(self, container_color: Color) -> NavigationSuiteScaffold
pub fn container_color(self, container_color: Color) -> NavigationSuiteScaffold
Sets the background behind the navigation widget and the content.
Sourcepub fn key(self, key: KeyRef) -> NavigationSuiteScaffold
pub fn key(self, key: KeyRef) -> NavigationSuiteScaffold
Sets the scaffold’s key.
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.