showLevitDialog<T> function
Future<T?>
showLevitDialog<T>({
- required BuildContext context,
- required WidgetBuilder builder,
- bool barrierDismissible = true,
- Color? barrierColor,
- String? barrierLabel,
- bool useSafeArea = true,
- RouteSettings? routeSettings,
- Offset? anchorPoint,
- TraversalEdgeBehavior? traversalEdgeBehavior,
Shows a Dialog that keeps access to the nearest Levit scope from context.
Wraps the dialog content with LScope.capture so context.levit.find still
resolves page- or app-local dependencies inside the overlay route.
Implementation
Future<T?> showLevitDialog<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,
}) {
return showDialog<T>(
context: context,
barrierDismissible: barrierDismissible,
barrierColor: barrierColor,
barrierLabel: barrierLabel,
useSafeArea: useSafeArea,
useRootNavigator: useRootNavigator,
routeSettings: routeSettings,
anchorPoint: anchorPoint,
traversalEdgeBehavior: traversalEdgeBehavior,
builder: (_) => LScope.capture(
context,
child: Builder(builder: builder),
),
);
}