showCustomDialog function
Implementation
void showCustomDialog(BuildContext context, String title, String message,
Function okPressed) async {
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
// return object of type Dialog
return AlertDialog(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0))),
title: Text(
title
),
content: Text(
message
),
actions: <Widget>[
ElevatedButton(
child:
const Text("OK"),
onPressed: okPressed(),
),
],
);
},
);
}