dialogBox function

void dialogBox({
  1. String? title,
  2. Option? button01,
  3. Option? button02,
  4. VoidCallback? press01,
  5. VoidCallback? press02,
  6. bool? switchButtons,
  7. bool? barrierDismissible,
  8. Color? barrierColor,
  9. String? barrierLabel,
  10. bool? useSafeArea,
  11. bool? useRootNavigator,
  12. RouteSettings? routeSettings,
  13. Offset? anchorPoint,
})

A high-level function Displays a String passing specific one to two button options and their corresponding function calls.

Implementation

void dialogBox({
  String? title,
  Option? button01,
  Option? button02,
  VoidCallback? press01,
  VoidCallback? press02,
  bool? switchButtons,
  bool? barrierDismissible,
  Color? barrierColor,
  String? barrierLabel,
  bool? useSafeArea,
  bool? useRootNavigator,
  RouteSettings? routeSettings,
  Offset? anchorPoint,
}) {
  showDialog<bool>(
    context: App.context!,
    builder: (BuildContext context) {
      return _DialogWindow(
        title: title,
        button01: button01,
        button02: button02,
        press01: press01,
        press02: press02,
        switchButtons: switchButtons,
      ).show();
    },
    barrierDismissible: barrierDismissible ?? false,
    barrierColor: barrierColor ?? Colors.black54,
    barrierLabel: barrierLabel,
    useSafeArea: useSafeArea ?? true,
    useRootNavigator: useRootNavigator ?? true,
    routeSettings: routeSettings,
    anchorPoint: anchorPoint,
  );
}