showErrorDialog method
Implementation
void showErrorDialog(
{required String title, required String content, Function? onClick}) {
// Nếu nhiều hơn 1 dialog sẽ đóng dialog cũ
if (_numberDialog > 0) {
Navigator.of(_context).pop();
}
CustomAwesomeDialog(
context: _context,
dialogType: DialogType.ERROR,
animType: AnimType.BOTTOMSLIDE,
title: title,
dismissOnBackKeyPress: false,
desc: content,
btnCancel: _buildButton('OK', Colors.red, onClick: onClick),
customHeader: _buildHeader(Icons.close, color: Colors.red))
..show();
_numberDialog++;
}