cryConfirm function
Implementation
void cryConfirm(BuildContext context, String content, onConfirm) {
showDialog<void>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(S.of(context).information),
content: Text(content),
actions: <Widget>[
TextButton(
child: Text(S.of(context).cancel),
onPressed: () {
Navigator.of(context).pop();
},
),
TextButton(
child: Text(S.of(context).confirm),
onPressed: () {
Navigator.of(context).pop();
onConfirm(context);
},
),
],
);
},
);
}