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
impl ShowAdaptiveDialog
Sourcepub fn new(builder: WidgetBuilder) -> ShowAdaptiveDialog
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.
Sourcepub fn barrier_dismissible(
self,
barrier_dismissible: bool,
) -> ShowAdaptiveDialog
pub fn barrier_dismissible( self, barrier_dismissible: bool, ) -> ShowAdaptiveDialog
Whether tapping on the barrier will dismiss the dialog; the platform’s default when unset.
Sourcepub fn barrier_color(self, barrier_color: Color) -> ShowAdaptiveDialog
pub fn barrier_color(self, barrier_color: Color) -> ShowAdaptiveDialog
The color of the modal barrier that darkens everything below the dialog.
Sourcepub fn barrier_label(
self,
barrier_label: impl Into<String>,
) -> ShowAdaptiveDialog
pub fn barrier_label( self, barrier_label: impl Into<String>, ) -> ShowAdaptiveDialog
The semantic label of the dialog’s modal barrier.
Sourcepub fn use_safe_area(self, use_safe_area: bool) -> ShowAdaptiveDialog
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.
Whether to push the dialog to the root navigator rather than the nearest one. Defaults
to true.
Sourcepub fn route_settings(
self,
route_settings: RouteSettingsRef,
) -> ShowAdaptiveDialog
pub fn route_settings( self, route_settings: RouteSettingsRef, ) -> ShowAdaptiveDialog
The route settings passed to the dialog route.
Sourcepub fn traversal_edge_behavior(
self,
traversal_edge_behavior: TraversalEdgeBehavior,
) -> ShowAdaptiveDialog
pub fn traversal_edge_behavior( self, traversal_edge_behavior: TraversalEdgeBehavior, ) -> ShowAdaptiveDialog
How focus transfers beyond the first and last items of the dialog route.
Sourcepub fn request_focus(self, request_focus: bool) -> ShowAdaptiveDialog
pub fn request_focus(self, request_focus: bool) -> ShowAdaptiveDialog
Whether the dialog’s route requests focus when it is pushed.
Sourcepub fn animation_style(
self,
animation_style: AnimationStyle,
) -> ShowAdaptiveDialog
pub fn animation_style( self, animation_style: AnimationStyle, ) -> ShowAdaptiveDialog
An animation style that overrides the default animation duration and curves.
Sourcepub fn show(
self,
app: &mut App,
context: BuildContext,
) -> CompleterFuture<RouteResult> ⓘ
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.