showAlert static method
Implementation
static void showAlert(BuildContext context, {String title = '', String message = ''}) {
if(title.isEmpty) title = AppProperties.getAppName();
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
backgroundColor: AppColor.getMain(),
title: Text(title),
content: Text(message),
actions: <Widget>[
TextButton(
child: Text(AppTranslationConstants.close.tr,
style: const TextStyle(color: AppColor.white)
),
onPressed: () {
Navigator.pop(context);
},
),
],
);
},
);
}