ApplePayButton constructor
ApplePayButton({
- Key? key,
- PayProvider buttonProvider = PayProvider.apple_pay,
- required PaymentConfiguration paymentConfiguration,
- void onPaymentResult()?,
- required List<
PaymentItem> paymentItems, - double? cornerRadius,
- ApplePayButtonStyle style = ApplePayButtonStyle.black,
- ApplePayButtonType type = ApplePayButtonType.plain,
- double width = RawApplePayButton.minimumButtonWidth,
- double height = RawApplePayButton.minimumButtonHeight,
- EdgeInsets margin = EdgeInsets.zero,
- VoidCallback? onPressed,
- void onError(
- Object? error
- Widget? childOnError,
- Widget? loadingIndicator,
Implementation
ApplePayButton({
super.key,
super.buttonProvider = PayProvider.apple_pay,
required super.paymentConfiguration,
super.onPaymentResult,
required List<PaymentItem> paymentItems,
double? cornerRadius,
ApplePayButtonStyle style = ApplePayButtonStyle.black,
ApplePayButtonType type = ApplePayButtonType.plain,
super.width = RawApplePayButton.minimumButtonWidth,
super.height = RawApplePayButton.minimumButtonHeight,
super.margin = EdgeInsets.zero,
VoidCallback? onPressed,
super.onError,
super.childOnError,
super.loadingIndicator,
}) : assert(width >= RawApplePayButton.minimumButtonWidth),
assert(height >= RawApplePayButton.minimumButtonHeight) {
_applePayButton = RawApplePayButton(
style: style,
type: type,
cornerRadius: cornerRadius,
onPressed: _defaultOnPressed(onPressed, paymentItems));
}