showAlertDialog static method
Implementation
static Future<bool> showAlertDialog(BuildContext context,
{required AlertType alertType, String? title, String? subTitle, required String okText, Color? okColor, String? cancelText, Color? cancelColor}) async {
return await showCustomDialog(
context,
GeneralDialog(
title: title,
subTitle: subTitle,
yesAction: okText,
yesColor: okColor,
cancelAction: cancelText,
cancelColor: cancelColor,
icon: Icon(
alertType == AlertType.success
? Icons.check_circle
: alertType == AlertType.info
? Icons.info_rounded
: alertType == AlertType.warning
? Icons.warning_rounded
: Icons.error,
size: 70,
color: alertType == AlertType.success
? PrettyToast.successColor
: alertType == AlertType.info
? PrettyToast.infoColor
: alertType == AlertType.warning
? PrettyToast.warningColor
: PrettyToast.errorColor,
),
));
}