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
impl ShowRawDialog
Sourcepub fn new(builder: WidgetBuilder) -> ShowRawDialog
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.
Sourcepub fn route_builder(
self,
route_builder: RawDialogRouteBuilder,
) -> ShowRawDialog
pub fn route_builder( self, route_builder: RawDialogRouteBuilder, ) -> ShowRawDialog
Creates the route for the dialog; a RawDialogRoute is used when this is unset.
Whether to push the dialog to the root navigator. Defaults to true.
Sourcepub fn route_settings(self, route_settings: RouteSettingsRef) -> ShowRawDialog
pub fn route_settings(self, route_settings: RouteSettingsRef) -> ShowRawDialog
The route settings passed to the route when no route builder is given.
Sourcepub fn fullscreen_dialog(self, fullscreen_dialog: bool) -> ShowRawDialog
pub fn fullscreen_dialog(self, fullscreen_dialog: bool) -> ShowRawDialog
Whether this is a fullscreen dialog. Defaults to false.
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.