callConfirmDialog method

dynamic callConfirmDialog(
  1. BuildContext context,
  2. String msg,
  3. bool online,
  4. bool pos,
  5. bool nfc,
  6. bool atm,
)

Implementation

callConfirmDialog(BuildContext context, String msg, bool online, bool pos,
    bool nfc, bool atm) {
  QuickAlert.show(
      widget: WillPopScope(
        onWillPop: () async => false, // ⛔ block back button
        child: Container(),
      ),
      context: context,
      title: "Confirmation".tr,
      type: QuickAlertType.confirm,
      text: msg,
      confirmBtnText: 'yes'.tr,
      cancelBtnText: 'Cancel'.tr,
      confirmBtnColor: Colors.green,
      onConfirmBtnTap: () {
        Navigator.of(context).pop();
        callRupayBlockorUnblockAPI(context, online, pos, nfc, atm);
      },
      onCancelBtnTap: () {
        Navigator.of(context).pop();
      });
}