pub struct LocalHistoryEntry {
pub on_remove: Option<Listener>,
pub implies_app_bar_dismissal: bool,
/* private fields */
}Expand description
An entry in the history of a LocalHistoryRoute.
A LocalHistoryEntry represents a “mini” navigation state within a route. It allows
widgets or UI components to handle the back button or pop operations locally without
affecting the main navigator stack.
It is typically used for widgets such as dialogs, bottom sheets, or inline expandable panels that can be dismissed independently of the surrounding route.
When a local history entry is removed (e.g. via the back button), the
on_remove callback is called first. Only after all local history
entries have been removed will the route itself be popped.
See also:
LocalHistoryRoute, which manages a stack of local history entries.LocalHistoryRoute::add_local_history_entry, which adds an entry to a route.
Fields§
§on_remove: Option<Listener>Called when this entry is removed from the history of its associated
LocalHistoryRoute.
implies_app_bar_dismissal: boolWhether an app bar in the route this entry belongs to should automatically add a back button or close button.
Defaults to true.
Implementations§
Source§impl LocalHistoryEntry
impl LocalHistoryEntry
Sourcepub fn new(app: &mut App) -> Ref<LocalHistoryEntry>
pub fn new(app: &mut App) -> Ref<LocalHistoryEntry>
Creates an entry in the history of a LocalHistoryRoute; Dart’s optional arguments
are the setters.
implies_app_bar_dismissal defaults to true.
Sourcepub fn on_remove(
self: Ref<Self>,
app: &mut App,
on_remove: Listener,
) -> Ref<Self>
pub fn on_remove( self: Ref<Self>, app: &mut App, on_remove: Listener, ) -> Ref<Self>
Dart LocalHistoryEntry(onRemove:).
Sourcepub fn implies_app_bar_dismissal(
self: Ref<Self>,
app: &mut App,
implies_app_bar_dismissal: bool,
) -> Ref<Self>
pub fn implies_app_bar_dismissal( self: Ref<Self>, app: &mut App, implies_app_bar_dismissal: bool, ) -> Ref<Self>
Dart LocalHistoryEntry(impliesAppBarDismissal:).
Sourcepub fn remove(self: Handle<Self>, app: &mut App)
pub fn remove(self: Handle<Self>, app: &mut App)
Remove this entry from the history of its associated LocalHistoryRoute.