dialogBox function

void dialogBox({
  1. String? title,
  2. Option? button01,
  3. Option? button02,
  4. VoidCallback? press01,
  5. VoidCallback? press02,
  6. bool barrierDismissible = false,
  7. bool switchButtons = false,
})

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 barrierDismissible = false,
  bool switchButtons = false,
}) {
  showDialog<bool>(
      context: App.context!,
      barrierDismissible: barrierDismissible,
      builder: (BuildContext context) {
        return _DialogWindow(
          title: title,
          button01: button01,
          button02: button02,
          press01: press01,
          press02: press02,
          switchButtons: switchButtons,
        ).show();
      });
}