uniPaymentGooglePayButton static method
Widget
uniPaymentGooglePayButton({
- required String paymentConfigurationAsset,
- required dynamic failureListener(
- UniPaymentResponse response
- required dynamic successListener(),
- required UniPaymentItemStatus uniPaymentItemStatus,
- required UniPaymentItemTypes uniPaymentItemTypes,
- required dynamic onPressed(),
- required String paymentLabel,
- required String payableAmount,
- UniPaymentGoogleButtonStyle? uniPaymentGoogleButtonStyle,
- UniPaymentGoogleButtonType? uniPaymentGoogleButtonType,
- double? height,
- double? width,
- Widget? loadingIndicator,
uniPaymentGooglePayButton is called,to integrate GooglePay payment gateway.
Following parameters which are required need to pass while implementing,
rest of are not neccesary as per need.
paymentConfigurationAsset
where you add asset path from asset folder.
Implementation
static Widget uniPaymentGooglePayButton({
required String paymentConfigurationAsset,
required failureListener(UniPaymentResponse response),
required Function(UniPaymentResponse) successListener,
required UniPaymentItemStatus uniPaymentItemStatus,
required UniPaymentItemTypes uniPaymentItemTypes,
required Function() onPressed,
required String paymentLabel,
required String payableAmount,
UniPaymentGoogleButtonStyle? uniPaymentGoogleButtonStyle,
UniPaymentGoogleButtonType? uniPaymentGoogleButtonType,
double? height,
double? width,
Widget? loadingIndicator,
}) {
return GooglePayService().universalGooglePay(
paymentConfigurationAsset: paymentConfigurationAsset,
failureListener: failureListener,
successListener: successListener,
uniPaymentItemStatus: uniPaymentItemStatus,
uniPaymentItemTypes: uniPaymentItemTypes,
onPressed: onPressed,
paymentLabel: paymentLabel,
payableAmount: payableAmount,
height: height,
width: width ?? 350,
loadingIndicator: loadingIndicator ?? CircularProgressIndicator(),
uniPaymentGoogleButtonStyle: uniPaymentGoogleButtonStyle,
uniPaymentGoogleButtonType: uniPaymentGoogleButtonType,
);
}