showCustomAlertDialog static method
Future<bool?>
showCustomAlertDialog(
- dynamic context,
- dynamic message, {
- dynamic title,
- dynamic isActionCancel = false,
Implementation
static Future<bool?> showCustomAlertDialog(final context, message,
{title, isActionCancel = false}) {
final LanguageKey languageKey = LanguageKey();
title ??= MultiLanguage.get(languageKey.ttlWarning);
List<Widget> actions = [];
if (isActionCancel) {actions.add(_addAction(context, MultiLanguage
.get(languageKey.btnCancel), false, bgColor: Colors.grey));}
actions.add(_addAction(context, MultiLanguage.get(languageKey.btnOK), true));
return showDialog(context: context, barrierDismissible: false,
builder: (context) => AlertDialog(title: Text(title), content: Text(message), actions: actions)
);
}