create method
Future<bool>
create({
- required String title,
- required String message,
- required String okLabel,
- required String cancelLabel,
- required BuildContext context,
Implementation
Future<bool> create(
{required String title,
required String message,
required String okLabel,
required String cancelLabel,
required BuildContext context}) async {
bool? dialogReturn = await showDialog<bool>(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
content: SingleChildScrollView(
child: ListBody(children: <Widget>[
_getIcon(),
_getTitle(title),
_getMessage(message)
]),
),
actions: _getButtons(context, okLabel, cancelLabel),
);
},
);
return dialogReturn == true;
}