showYesNoDialog method

dynamic showYesNoDialog({
  1. required String message,
  2. required String title,
  3. String? textYes,
  4. String? textNo,
  5. VoidCallback? onYesPressed,
  6. VoidCallback? onNoPressed,
  7. Widget? content,
  8. bool barrierDismissible = false,
})

Implementation

showYesNoDialog(
    {required String message,
    required String title,
    String? textYes,
    String? textNo,
    VoidCallback? onYesPressed,
    VoidCallback? onNoPressed,
    Widget? content,
    bool barrierDismissible = false}) {
  Get.defaultDialog(
      title: title,
      middleText: message,
      content: content,
      backgroundColor: Get.theme.colorScheme.background,
      barrierDismissible: barrierDismissible,
      confirm: _getDialogBoxButton(textYes ?? LocaleKeys.generic_yes.tr,
          onYesPressed ?? () => Get.back()),
      cancel: _getDialogBoxButton(textNo ?? LocaleKeys.generic_no.tr,
          onNoPressed ?? () => Get.back()),
      radius: 8);
}