ApplePayButton constructor

ApplePayButton({
  1. Key? key,
  2. PayProvider buttonProvider = PayProvider.apple_pay,
  3. required PaymentConfiguration paymentConfiguration,
  4. void onPaymentResult(
    1. Map<String, dynamic> result
    )?,
  5. required List<PaymentItem> paymentItems,
  6. double? cornerRadius,
  7. ApplePayButtonStyle style = ApplePayButtonStyle.black,
  8. ApplePayButtonType type = ApplePayButtonType.plain,
  9. double width = RawApplePayButton.minimumButtonWidth,
  10. double height = RawApplePayButton.minimumButtonHeight,
  11. EdgeInsets margin = EdgeInsets.zero,
  12. VoidCallback? onPressed,
  13. void onError(
    1. Object? error
    )?,
  14. Widget? childOnError,
  15. 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));
}