showDialog<B> method
Future<B?>
showDialog<B>({
- required Widget builder(
- BuildContext context
- bool barrierDismissible = true,
- Color? barrierColor,
- String? barrierLabel,
- bool useSafeArea = true,
- RouteSettings? routeSettings,
- Offset? anchorPoint,
- TraversalEdgeBehavior? traversalEdgeBehavior,
Implementation
Future<B?> showDialog<B>({
required Widget Function(BuildContext context) builder,
bool barrierDismissible = true,
Color? barrierColor,
String? barrierLabel,
bool useSafeArea = true,
bool useRootNavigator = true,
RouteSettings? routeSettings,
Offset? anchorPoint,
TraversalEdgeBehavior? traversalEdgeBehavior,
}) async {
return await material.showDialog<B>(
context: this,
barrierDismissible: barrierDismissible,
barrierColor: barrierColor,
barrierLabel: barrierLabel,
useSafeArea: useSafeArea,
useRootNavigator: useRootNavigator,
routeSettings: routeSettings,
anchorPoint: anchorPoint,
traversalEdgeBehavior: traversalEdgeBehavior,
builder: (context) {
return ScaffoldMessenger(
child: Builder(
builder: builder,
),
);
},
);
}