Flutter & Dart · Function
showDialog
showDialog opens a Material dialog above the current app content. It returns a Future containing the result supplied when the dialog closes, or null when no result is supplied.
Last updated
Syntax
Future<T?> showDialog<T>({
required BuildContext context,
required WidgetBuilder builder,
bool barrierDismissible = true,
Color? barrierColor,
String? barrierLabel,
bool useSafeArea = true,
bool useRootNavigator = true,
RouteSettings? routeSettings,
Offset? anchorPoint,
TraversalEdgeBehavior? traversalEdgeBehavior,
bool fullscreenDialog = false,
bool? requestFocus,
AnimationStyle? animationStyle,
})In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
DialogAlertDialogSimpleDialogshowCupertinoDialogshowGeneralDialogDialogRouteDisplayFeatureSubScreen