customShowDialogWaring static method

void customShowDialogWaring(
  1. BuildContext context, {
  2. required String? msg,
  3. Color? colorWaring,
  4. VoidCallback? callBack,
})

Implementation

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