customShowSnackbar static method
Future<void>
customShowSnackbar(
- BuildContext context, {
- String? status,
- String? title,
- String? message,
- Color? colorWaring,
- VoidCallback? callBack,
Implementation
static Future<void> customShowSnackbar(BuildContext context, {String? status, String? title, String? message, Color? colorWaring, VoidCallback? callBack}) async {
await showDialog(
context: context,
barrierDismissible: true,
builder: (BuildContext context) {
return CustomDialogOne(
content: message ?? StatusHelper.getMessageStatusCall(status: status),
title: "Thông báo",
positiveBtnText: "Đồng ý",
iconWarning: CustomIcon(icon: Icons.warning, color: Colors.white, size: Sizes.ICON_SIZE_24),
positiveBtnPressed: () {
if (callBack != null) {
Navigator.of(context).pop();
return callBack();
} else {
Navigator.of(context).pop();
}
});
}
);
}