alertDialog function
Implementation
void alertDialog({
String title = 'Alert',
String content = 'Alert message',
Function? confirm,
}) {
Get.dialog(
AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5), // Adjust border radius here
),
title: Text(title),
content: Text(content),
actions: [
Button(
label: "OK",
backgroundColor: Colors.red,
color: Colors.white,
borderRadius: 10,
borderColor: Colors.black,
onClick: (_) {
Get.back();
if (confirm != null) confirm();
},
),
],
),
);
}