pub struct ThreePaneNavigator<E: 'static, K: PartialEq + 'static> {
pub key: Option<KeyRef>,
pub navigator_key: Option<GlobalKey>,
pub strategy: ThreePaneSceneStrategy,
pub back_stack: Vec<E>,
pub pane_of: ThreePaneOf<E, K>,
pub entry_page: ThreePaneEntryPageBuilder,
pub scene_page: ThreePaneScenePageBuilder,
pub on_back_stack_truncated: ThreePaneBackStackTruncated,
}Expand description
A Navigator whose pages follow an app’s back stack, grouped by a ThreePaneSceneStrategy.
Each entry before the scene is a page of its own, and one page holds the scene. With no scene every entry is its own page, so a phone’s detail is an ordinary pushed page with the platform’s back gestures. A page’s key and name are the first back-stack index it shows, so a resize that splits a scene keeps the list’s page; pages a resize adds or removes come and go without a transition.
The back stack stays the app’s: every back, whether it leaves a page or only changes the
panes of the scene, reaches the app as the length its stack should be truncated to. The
navigator is nested in the app’s, so it takes the system back first, through a
NavigatorPopHandler, while it has a page to pop.
Fields§
§key: Option<KeyRef>The widget’s key.
The inner navigator’s key; None uses one of the widget’s own.
strategy: ThreePaneSceneStrategyWhich trailing entries share a page.
back_stack: Vec<E>The app’s own back stack.
pane_of: ThreePaneOf<E, K>The pane each entry fills, or None for an entry that is not a pane.
entry_page: ThreePaneEntryPageBuilderBuilds the page of its own for an entry.
scene_page: ThreePaneScenePageBuilderBuilds the page that holds the scene.
on_back_stack_truncated: ThreePaneBackStackTruncatedCalled with the length the back stack has after back.
Implementations§
Sourcepub fn new(
strategy: ThreePaneSceneStrategy,
back_stack: Vec<E>,
pane_of: impl Fn(&E) -> Option<ThreePaneScaffoldDestinationItem<K>> + 'static,
entry_page: impl Fn(&mut App, BuildContext, usize) -> WidgetRef + 'static,
scene_page: impl Fn(&mut App, BuildContext, &ThreePaneScaffoldScene) -> WidgetRef + 'static,
on_back_stack_truncated: impl Fn(&mut App, usize) + 'static,
) -> ThreePaneNavigator<E, K>
pub fn new( strategy: ThreePaneSceneStrategy, back_stack: Vec<E>, pane_of: impl Fn(&E) -> Option<ThreePaneScaffoldDestinationItem<K>> + 'static, entry_page: impl Fn(&mut App, BuildContext, usize) -> WidgetRef + 'static, scene_page: impl Fn(&mut App, BuildContext, &ThreePaneScaffoldScene) -> WidgetRef + 'static, on_back_stack_truncated: impl Fn(&mut App, usize) + 'static, ) -> ThreePaneNavigator<E, K>
Creates a navigator over the app’s back_stack: pane_of names the pane each entry
fills (None for an entry that is not a pane), entry_page builds an entry’s own page,
scene_page the page of the scene, and on_back_stack_truncated receives every back.
Sourcepub fn key(self, key: KeyRef) -> ThreePaneNavigator<E, K>
pub fn key(self, key: KeyRef) -> ThreePaneNavigator<E, K>
Sets the widget’s key.
Sets the inner navigator’s key.
Trait Implementations§
Source§type State = ThreePaneNavigatorState<E, K>
type State = ThreePaneNavigatorState<E, K>
Source§fn create_state(&self) -> ThreePaneNavigatorState<E, K>
fn create_state(&self) -> ThreePaneNavigatorState<E, K>
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_preferred_size_widget(
&self,
) -> Option<&(dyn PreferredSizeWidget + 'static)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Widget::type_name. A stateful form another widget kind becomes (an animated or
status transition widget) names the widget it wraps.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<StatefulKind> for Wwhere
W: StatefulWidget,
impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.