Skip to main content

ShowGeneralDialog

Struct ShowGeneralDialog 

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

Displays a dialog above the current contents of the app.

This function allows for customization of aspects of the dialog popup.

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.

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

See also:

Implementations§

Source§

impl ShowGeneralDialog

Source

pub fn new(page_builder: RoutePageBuilder) -> ShowGeneralDialog

Creates a builder for a general dialog; Dart’s showGeneralDialog required argument is the page builder, and every other argument is a setter.

Source

pub fn barrier_dismissible(self, barrier_dismissible: bool) -> ShowGeneralDialog

Whether tapping the barrier dismisses the dialog. Defaults to false.

Source

pub fn barrier_label( self, barrier_label: impl Into<String>, ) -> ShowGeneralDialog

The semantic label of the dialog’s modal barrier.

Source

pub fn barrier_color(self, barrier_color: Color) -> ShowGeneralDialog

The color of the dialog’s modal barrier.

Source

pub fn transition_duration( self, transition_duration: Duration, ) -> ShowGeneralDialog

The duration of the dialog’s transition.

Source

pub fn transition_builder( self, transition_builder: RouteTransitionsBuilder, ) -> ShowGeneralDialog

Builds the dialog’s transition.

Source

pub fn barrier_builder( self, barrier_builder: RouteBarrierBuilder, ) -> ShowGeneralDialog

Builds the dialog’s barrier.

Source

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

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

Source

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

Whether this is a fullscreen dialog. Defaults to false.

Source

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

The route settings passed to the dialog’s route.

Source

pub fn request_focus(self, request_focus: bool) -> ShowGeneralDialog

Whether the dialog’s route requests focus when it is pushed.

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 ShowGeneralDialog

§

impl !Send for ShowGeneralDialog

§

impl !Sync for ShowGeneralDialog

§

impl !UnwindSafe for ShowGeneralDialog

§

impl Forget for ShowGeneralDialog

§

impl Freeze for ShowGeneralDialog
where *const RcInner<dyn Fn(&mut App, AnyElement, Retained<AnyAnimation<f64>>, Retained<AnyAnimation<f64>>) -> Rc<dyn Widget>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, Retained<AnyAnimation<f64>>, Retained<AnyAnimation<f64>>) -> Rc<dyn Widget>>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const RcInner<dyn Fn(&mut App, AnyElement, Retained<AnyAnimation<f64>>, Retained<AnyAnimation<f64>>, Rc<dyn Widget>) -> Rc<dyn Widget>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, Retained<AnyAnimation<f64>>, Retained<AnyAnimation<f64>>, Rc<dyn Widget>) -> Rc<dyn Widget>>>: Freeze, *const RcInner<dyn Fn(&mut App, AnyElement, &RouteBarrierDetails, Rc<dyn Widget>) -> Rc<dyn Widget>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, &RouteBarrierDetails, Rc<dyn Widget>) -> Rc<dyn Widget>>>: 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 ShowGeneralDialog

§

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

§

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