showTwoButtonDialogProblem<T> static method

Future<T?> showTwoButtonDialogProblem<T>({
  1. dynamic onTapPositiveButton()?,
  2. dynamic onTapNegativeButton()?,
  3. String description = 'Terjadi Kesalahan, Silahkan Coba Lagi',
  4. String title = 'Upss Ada Masalah',
  5. String textPositiveButton = 'Lanjutkan',
  6. String textNegativeButton = 'Tutup',
  7. String? asset,
  8. bool barrierDismissible = true,
  9. bool useAnimationLottie = false,
  10. required String customAsset,
  11. Color descColors = Colors.black87,
  12. bool isHorizontal = false,
  13. String? dialogName,
  14. double? imageSize = 24,
})

Implementation

static Future<T?> showTwoButtonDialogProblem<T>({
  Function()? onTapPositiveButton,
  Function()? onTapNegativeButton,
  String description = 'Terjadi Kesalahan, Silahkan Coba Lagi',
  String title = 'Upss Ada Masalah',
  String textPositiveButton = 'Lanjutkan',
  String textNegativeButton = 'Tutup',
  String? asset,
  bool barrierDismissible = true,
  bool useAnimationLottie = false,
  required String customAsset,
  Color descColors = Colors.black87,
  bool isHorizontal = false,
  String? dialogName,
  double? imageSize = 24,
}) async {
  return await showDialogGeneral<T>(
    barrierDismissible: barrierDismissible,
    dialogName: dialogName,
    content: DialogContentGeneralWidget.twoButton(
      descColors: descColors,
      onTapNegativeButton: onTapNegativeButton ?? () => Get.back(),
      onTapPositiveButton: onTapPositiveButton ?? () => Get.back(),
      textNegativeButton: textNegativeButton,
      textPositiveButton: textPositiveButton,
      barrierDismissible: barrierDismissible,
      description: description,
      title: title,
      isHorizontal: isHorizontal,
      imagePath: customAsset,
      imageSize: imageSize,
    ),
  );
}