paymentPendingPopUpDialog static method

dynamic paymentPendingPopUpDialog({
  1. required String headingText,
  2. required String subHeading,
  3. required VoidCallback onTapReviewNow,
  4. required VoidCallback onTapDismiss,
})

Implementation

static paymentPendingPopUpDialog({
  required String headingText,
  required String subHeading,
  required VoidCallback onTapReviewNow,
  required VoidCallback onTapDismiss,
}) {
  final Localization localization = Localization.getInstance();
  Get.dialog(
    AlertDialog(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(12),
      ),
      backgroundColor: ColorConstant.white,
      titlePadding: EdgeInsets.zero,
      contentPadding: EdgeInsets.zero,
      insetPadding: EdgeInsets.symmetric(
          horizontal: SizeConstant.getHeightWithScreen(16)),
      content: Padding(
        padding: EdgeInsets.all(SizeConstant.getHeightWithScreen(24)),
        child: SizedBox(
          width: double.maxFinite,
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              SvgPicture.asset(
                "assets/images/payment_processing.svg",
                package: Constants.packageName,
                height: SizeConstant.getHeightWithScreen(40),
                width: SizeConstant.getHeightWithScreen(40),
              ),
              SizedBox(height: SizeConstant.getHeightWithScreen(10)),
              Text(
                headingText,
                style: TextStyle(
                  color: ColorConstant.darkGrey2,
                  fontSize: SizeConstant.largeFont,
                  fontFamily: "Cellcard",
                  fontWeight: FontWeight.w400,
                  height: 1.75,
                ),
                textAlign: TextAlign.center,
              ),
              Text(
                subHeading,
                style: TextStyle(
                  fontSize: SizeConstant.mediumFont,
                  color: ColorConstant.darkGrey,
                  fontWeight: FontWeight.w300,
                  fontFamily: "Cellcard",
                  height: 1.43,
                ),
                textAlign: TextAlign.center,
              ),
              SizedBox(height: SizeConstant.getHeightWithScreen(16)),
              Row(
                children: [
                  Expanded(
                    child: VentasPrimaryButton(
                      onTap: onTapReviewNow,
                      label: localization.translate('reviewNow'),
                      btnHeight: SizeConstant.getHeightWithScreen(40),
                      textColor: ColorConstant.white,
                      borderRadius: SizeConstant.getHeightWithScreen(8),
                      bgColor: ColorConstant.paymentBtnColor,
                      disableColor: ColorConstant.disableLightBlue,
                      weight: FontWeight.w500,
                      textSize: SizeConstant.largeFont,
                      fontFamily: "Cellcard",
                    ),
                  ),
                  SizedBox(width: SizeConstant.getHeightWithScreen(12)),
                  Expanded(
                    child: VentasPrimaryButton(
                      onTap: onTapDismiss,
                      label: localization.translate('dismiss'),
                      btnHeight: SizeConstant.getHeightWithScreen(40),
                      textColor: ColorConstant.darkGrey,
                      borderRadius: SizeConstant.getHeightWithScreen(8),
                      bgColor: ColorConstant.white,
                      borderColor: ColorConstant.darkGrey,
                      weight: FontWeight.w500,
                      textSize: SizeConstant.largeFont,
                      fontFamily: "Cellcard",
                    ),
                  ),
                ],
              ),
            ],
          ),
        ),
      ),
    ),
  );
}