paymentProcessingPopUpDialog static method
dynamic
paymentProcessingPopUpDialog({
- required String headingText,
- required String subHeading,
- String? note,
- required VoidCallback onTapContinue,
- required VoidCallback onTapCancel,
Implementation
static paymentProcessingPopUpDialog({
required String headingText,
required String subHeading,
String? note,
required VoidCallback onTapContinue,
required VoidCallback onTapCancel,
}) {
final Localization localization = Localization.getInstance();
Get.dialog(
WillPopScope(
onWillPop: () async {
return false;
},
child: 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,
),
note != null
? SizedBox(height: SizeConstant.getHeightWithScreen(20))
: const SizedBox(),
note != null
? Text(
note,
style: TextStyle(
fontSize: SizeConstant.smallFont,
color: ColorConstant.darkGrey,
fontWeight: FontWeight.w400,
fontFamily: "Cellcard",
height: 1.43,
),
textAlign: TextAlign.center,
)
: const SizedBox(),
SizedBox(height: SizeConstant.getHeightWithScreen(16)),
Row(
children: [
Expanded(
child: VentasPrimaryButton(
onTap: onTapContinue,
label: localization.translate('yes'),
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: onTapCancel,
label: localization.translate('no'),
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",
),
),
],
),
],
),
),
),
),
),
);
}