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:
RawDialogRoute, the route this pushes.
Implementations§
Source§impl ShowGeneralDialog
impl ShowGeneralDialog
Sourcepub fn new(page_builder: RoutePageBuilder) -> ShowGeneralDialog
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.
Sourcepub fn barrier_dismissible(self, barrier_dismissible: bool) -> ShowGeneralDialog
pub fn barrier_dismissible(self, barrier_dismissible: bool) -> ShowGeneralDialog
Whether tapping the barrier dismisses the dialog. Defaults to false.
Sourcepub fn barrier_label(
self,
barrier_label: impl Into<String>,
) -> ShowGeneralDialog
pub fn barrier_label( self, barrier_label: impl Into<String>, ) -> ShowGeneralDialog
The semantic label of the dialog’s modal barrier.
Sourcepub fn barrier_color(self, barrier_color: Color) -> ShowGeneralDialog
pub fn barrier_color(self, barrier_color: Color) -> ShowGeneralDialog
The color of the dialog’s modal barrier.
Sourcepub fn transition_duration(
self,
transition_duration: Duration,
) -> ShowGeneralDialog
pub fn transition_duration( self, transition_duration: Duration, ) -> ShowGeneralDialog
The duration of the dialog’s transition.
Sourcepub fn transition_builder(
self,
transition_builder: RouteTransitionsBuilder,
) -> ShowGeneralDialog
pub fn transition_builder( self, transition_builder: RouteTransitionsBuilder, ) -> ShowGeneralDialog
Builds the dialog’s transition.
Sourcepub fn barrier_builder(
self,
barrier_builder: RouteBarrierBuilder,
) -> ShowGeneralDialog
pub fn barrier_builder( self, barrier_builder: RouteBarrierBuilder, ) -> ShowGeneralDialog
Builds the dialog’s barrier.
Whether to push the dialog to the root navigator. Defaults to true.
Sourcepub fn fullscreen_dialog(self, fullscreen_dialog: bool) -> ShowGeneralDialog
pub fn fullscreen_dialog(self, fullscreen_dialog: bool) -> ShowGeneralDialog
Whether this is a fullscreen dialog. Defaults to false.
Sourcepub fn route_settings(
self,
route_settings: RouteSettingsRef,
) -> ShowGeneralDialog
pub fn route_settings( self, route_settings: RouteSettingsRef, ) -> ShowGeneralDialog
The route settings passed to the dialog’s route.
Sourcepub fn request_focus(self, request_focus: bool) -> ShowGeneralDialog
pub fn request_focus(self, request_focus: bool) -> ShowGeneralDialog
Whether the dialog’s route requests focus when it is pushed.
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 when it closes.