CheckoutPage constructor

CheckoutPage({
  1. Key? key,
  2. required Future<IntentClientSecret> createPaymentIntent(),
  3. void onPaymentSuccess(
    1. BuildContext context,
    2. Map<String, dynamic> paymentIntent
    )?,
  4. void onPaymentFailed(
    1. BuildContext context,
    2. Map<String, dynamic> paymentIntent
    )?,
  5. void onPaymentError(
    1. BuildContext,
    2. StripeApiException
    )?,
})

Implementation

CheckoutPage({
  Key? key,
  required this.createPaymentIntent,
  void Function(BuildContext context, Map<String, dynamic> paymentIntent)?
      onPaymentSuccess,
  void Function(BuildContext context, Map<String, dynamic> paymentIntent)?
      onPaymentFailed,
  void Function(BuildContext, StripeApiException)? onPaymentError,
})  : onPaymentSuccess = onPaymentSuccess ?? StripeUiOptions.onPaymentSuccess,
      onPaymentFailed = onPaymentFailed ?? StripeUiOptions.onPaymentFailed,
      onPaymentError = onPaymentError ?? StripeUiOptions.onPaymentError,
      super(key: key);