Skip to main content

LocalHistoryEntry

Struct LocalHistoryEntry 

Source
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:

Fields§

§on_remove: Option<Listener>

Called when this entry is removed from the history of its associated LocalHistoryRoute.

§implies_app_bar_dismissal: bool

Whether 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

Source

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.

Source

pub fn on_remove( self: Ref<Self>, app: &mut App, on_remove: Listener, ) -> Ref<Self>

Dart LocalHistoryEntry(onRemove:).

Source

pub fn implies_app_bar_dismissal( self: Ref<Self>, app: &mut App, implies_app_bar_dismissal: bool, ) -> Ref<Self>

Dart LocalHistoryEntry(impliesAppBarDismissal:).

Source

pub fn remove(self: Handle<Self>, app: &mut App)

Remove this entry from the history of its associated LocalHistoryRoute.

Trait Implementations§

Source§

impl Debug for LocalHistoryEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for LocalHistoryEntry

§

impl !Send for LocalHistoryEntry

§

impl !Sync for LocalHistoryEntry

§

impl !UnwindSafe for LocalHistoryEntry

§

impl Forget for LocalHistoryEntry

§

impl Freeze for LocalHistoryEntry
where *const RcInner<dyn Fn(&mut App)> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze, NonZero<u32>: Freeze, *const (): Freeze, &'static RouteVTable: Freeze,

§

impl Move for LocalHistoryEntry

§

impl Unpin for LocalHistoryEntry
where Rc<dyn Fn(&mut App)>: Unpin, NonZero<u32>: Unpin, *const (): Unpin, &'static RouteVTable: Unpin,

§

impl UnsafeUnpin for LocalHistoryEntry
where *const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin, NonZeroU32Inner: UnsafeUnpin, *const (): UnsafeUnpin, &'static RouteVTable: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>