PEApplePayButton constructor
const
PEApplePayButton({
- Key? key,
- required PEPaymentRequest paymentRequest,
- double width = double.infinity,
- double height = 36,
- dynamic onPaymentFailed()?,
- VoidCallback? onPaymentSheetDismissed,
- dynamic onTokenDidReturn(
- String token,
- dynamic metadata,
- PEApplePayContact? billingContact,
- PEApplePayContact? shippingContact,
Creates an instance of PEApplePayButton.
paymentRequest: The payment request details.onPaymentFailed: Callback triggered on payment failure.onPaymentSheetDismissed: Callback triggered when the payment sheet is dismissed.onTokenDidReturn: Callback triggered when a payment token is successfully received.width: The button's width (default is full width).height: The button's height (default is36).
Implementation
const PEApplePayButton({
Key? key,
required this.paymentRequest,
this.width = double.infinity,
this.height = 36,
this.onPaymentFailed,
this.onPaymentSheetDismissed,
this.onTokenDidReturn,
}) : super(key: key);