Skip to main content

ShowRawDialog

Struct ShowRawDialog 

Source
pub struct ShowRawDialog { /* private fields */ }
Expand description

Displays a dialog above the current contents of the app.

This function allows for customization of the dialog route through route_builder. If route_builder is not provided, a RawDialogRoute is used.

The context argument is used to look up the Navigator for the dialog. It is only used when the method is called. Its corresponding widget can be safely removed from the tree before the dialog is closed.

The use_root_navigator argument is used to determine whether to push the dialog to the Navigator furthest from or nearest to the given context. By default, use_root_navigator is true and the dialog route created by this method is pushed to the root navigator.

The route_settings argument is passed to the route created by this method when no route_builder is given.

Returns a future that resolves to the value (if any) that was passed to Navigator::pop when the dialog was closed.

Implementations§

Source§

impl ShowRawDialog

Source

pub fn new(builder: WidgetBuilder) -> ShowRawDialog

Creates a builder for a raw dialog; Dart’s showRawDialog required argument is the builder, and every other argument is a setter.

Source

pub fn route_builder( self, route_builder: RawDialogRouteBuilder, ) -> ShowRawDialog

Creates the route for the dialog; a RawDialogRoute is used when this is unset.

Source

pub fn use_root_navigator(self, use_root_navigator: bool) -> ShowRawDialog

Whether to push the dialog to the root navigator. Defaults to true.

Source

pub fn route_settings(self, route_settings: RouteSettingsRef) -> ShowRawDialog

The route settings passed to the route when no route builder is given.

Source

pub fn fullscreen_dialog(self, fullscreen_dialog: bool) -> ShowRawDialog

Whether this is a fullscreen dialog. Defaults to false.

Source

pub fn show( self, app: &mut App, context: BuildContext, ) -> CompleterFuture<RouteResult> ⓘ

Displays the dialog and returns a future that resolves when it closes.

Auto Trait Implementations§

§

impl !RefUnwindSafe for ShowRawDialog

§

impl !Send for ShowRawDialog

§

impl !Sync for ShowRawDialog

§

impl !UnwindSafe for ShowRawDialog

§

impl Forget for ShowRawDialog

§

impl Freeze for ShowRawDialog
where *const RcInner<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>>: Freeze, *const RcInner<dyn Fn(&mut App, AnyElement, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>) -> Retained<AnyRoute>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>) -> Retained<AnyRoute>>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const RcInner<dyn Any> is !null: Freeze, PhantomData<RcInner<dyn Any>>: Freeze, *const RcInner<dyn Page> is !null: Freeze, PhantomData<RcInner<dyn Page>>: Freeze,

§

impl Move for ShowRawDialog

§

impl Unpin for ShowRawDialog
where Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>: Unpin, Rc<dyn Fn(&mut App, AnyElement, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>) -> Retained<AnyRoute>>: Unpin, *const u8 is !null: Unpin, Rc<dyn Any>: Unpin, Rc<dyn Page>: Unpin,

§

impl UnsafeUnpin for ShowRawDialog
where *const RcInner<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, AnyElement, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>) -> Retained<AnyRoute>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>) -> Retained<AnyRoute>>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const RcInner<dyn Any> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Any>>: UnsafeUnpin, *const RcInner<dyn Page> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Page>>: 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>