showSuccessDialog method
Implementation
Future<void> showSuccessDialog({
String title = "Başarılı",
required String message,
String confirmText = "Tamam",
Color? titleColor,
Color? iconColor,
Color? contentColor,
Color? confirmTextColor,
VoidCallback? onConfirm,
}) async {
await showDialog(
context: this,
builder: (_) => AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(lowRadiusValue),
),
icon: Icon(
Icons.check_circle,
color: iconColor ?? Colors.green,
size: 48,
),
title: Text(title, style: TextStyle(color: titleColor ?? Colors.green)),
content: Text(
message,
style: TextStyle(
color: contentColor ?? theme.textTheme.bodyMedium?.color,
),
),
actions: [
TextButton(
onPressed: () {
pop();
onConfirm?.call();
},
child: Text(
confirmText,
style: TextStyle(color: confirmTextColor ?? theme.primaryColor),
),
),
],
),
);
}