confirm method

Future<void> confirm(
  1. BuildContext context,
  2. String title,
  3. String message,
  4. dynamic onConfirm()?,
  5. dynamic onDeny()?,
)

Implementation

Future<void> confirm(
  BuildContext context,
  String title,
  String message,
  Function()? onConfirm,
  Function()? onDeny,
) async {
  return showDialog<void>(
    context: context,
    barrierDismissible: false,
    builder: (BuildContext ctx) {
      return OmegaConfirmDialogWidget(
        title: title,
        description: message,
        noPressed: onDeny,
        yesPressed: onConfirm,
        textColor: OmegaLibConfig.dialogFieldStyle.textColor,
        bgColor: OmegaLibConfig.dialogFieldStyle.bgColor,
      );
    },
  );
}