showAlertDialogMessage method

dynamic showAlertDialogMessage({
  1. String? title,
  2. String content = "",
  3. double maxHeight = 150,
  4. String textCancel = "cancel",
  5. String textDone = "accept",
  6. VoidCallback? onDoneClick,
  7. VoidCallback? onCancelClick,
})

Implementation

showAlertDialogMessage(
    {String? title,
    String content = "",
    double maxHeight = 150,
    String textCancel = "cancel",
    String textDone = "accept",
    VoidCallback? onDoneClick,
    VoidCallback? onCancelClick}) {
  if (Get.context == null) {
    return;
  }
  Future.delayed(Duration.zero, () {
    showDialog(
        context: Get.context!,
        // barrierDismissible: false,
        builder: (BuildContext context) => Dialog(
            elevation: 0,
            shape: const RoundedRectangleBorder(
              borderRadius: BorderRadius.all(Radius.circular(24)),
            ),
            backgroundColor: Colors.transparent,
            child: DialogView(
              content: content,
              titleButtonCancel: textCancel,
              titleButtonDone: textDone,
              maxHeight: maxHeight,
              onDoneClick: onDoneClick,
              onCancelClick: onCancelClick,
              title: title,
            )));
  });
}