2020-09-25 15:32:44 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2023-04-27 15:06:09 +00:00
|
|
|
Future<T?> showPopUp<T>(
|
|
|
|
{required BuildContext context,
|
|
|
|
required WidgetBuilder builder,
|
|
|
|
bool barrierDismissible = true,
|
|
|
|
Color? barrierColor,
|
|
|
|
bool useSafeArea = false,
|
|
|
|
bool useRootNavigator = true,
|
|
|
|
RouteSettings? routeSettings}) async {
|
|
|
|
if (context.mounted) {
|
|
|
|
return showDialog<T>(
|
|
|
|
context: context,
|
|
|
|
builder: builder,
|
|
|
|
barrierDismissible: barrierDismissible,
|
|
|
|
barrierColor: barrierColor,
|
|
|
|
useSafeArea: useSafeArea,
|
|
|
|
useRootNavigator: useRootNavigator,
|
|
|
|
routeSettings: routeSettings);
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
2020-09-25 15:32:44 +00:00
|
|
|
}
|