Skip to main content

ShowAdaptiveDialog

Struct ShowAdaptiveDialog 

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

Builder for a dialog that is Material or Cupertino by platform, in place of Dart’s named arguments.

On most platforms it acts the same as ShowDialog, except for iOS and macOS, where it acts more like ShowCupertinoDialog. On Cupertino platforms, barrier_color, use_safe_area and traversal_edge_behavior are ignored.

Implementations§

Source§

impl ShowAdaptiveDialog

Source

pub fn new(builder: WidgetBuilder) -> ShowAdaptiveDialog

Creates a builder for a platform-adaptive dialog; Dart’s showAdaptiveDialog required argument is the builder, and every other argument is a setter.

Source

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

Whether tapping on the barrier will dismiss the dialog; the platform’s default when unset.

Source

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

The color of the modal barrier that darkens everything below the dialog.

Source

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

The semantic label of the dialog’s modal barrier.

Source

pub fn use_safe_area(self, use_safe_area: bool) -> ShowAdaptiveDialog

Whether the dialog should only display in the safe areas of the screen. Defaults to true.

Source

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

Whether to push the dialog to the root navigator rather than the nearest one. Defaults to true.

Source

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

The route settings passed to the dialog route.

Source

pub fn traversal_edge_behavior( self, traversal_edge_behavior: TraversalEdgeBehavior, ) -> ShowAdaptiveDialog

How focus transfers beyond the first and last items of the dialog route.

Source

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

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

Source

pub fn animation_style( self, animation_style: AnimationStyle, ) -> ShowAdaptiveDialog

An animation style that overrides the default animation duration and curves.

Source

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

Displays the dialog and returns a future that resolves to the value passed to Navigator::pop when it closes.

Auto Trait Implementations§

§

impl !RefUnwindSafe for ShowAdaptiveDialog

§

impl !Send for ShowAdaptiveDialog

§

impl !Sync for ShowAdaptiveDialog

§

impl !UnwindSafe for ShowAdaptiveDialog

§

impl Forget for ShowAdaptiveDialog

§

impl Freeze for ShowAdaptiveDialog
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 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, *const RcInner<dyn Curve> is !null: Freeze, PhantomData<RcInner<dyn Curve>>: Freeze,

§

impl Move for ShowAdaptiveDialog

§

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

§

impl UnsafeUnpin for ShowAdaptiveDialog
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 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, *const RcInner<dyn Curve> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Curve>>: 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>