SetupPaymentSheetParametersPatterns extension

Adds pattern-matching-related methods to SetupPaymentSheetParameters.

on

Methods

map<TResult extends Object?>(TResult $default(_SetupParameters value)) → TResult

Available on SetupPaymentSheetParameters, provided by the SetupPaymentSheetParametersPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_SetupParameters value)?) → TResult?

Available on SetupPaymentSheetParameters, provided by the SetupPaymentSheetParametersPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_SetupParameters value)?, {required TResult orElse()}) → TResult

Available on SetupPaymentSheetParameters, provided by the SetupPaymentSheetParametersPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(bool customFlow, String? customerId, String? primaryButtonLabel, String? customerEphemeralKeySecret, String? customerSessionClientSecret, String? paymentIntentClientSecret, String? setupIntentClientSecret, IntentConfiguration? intentConfiguration, String? merchantDisplayName, PaymentSheetApplePay? applePay, ThemeMode? style, PaymentSheetGooglePay? googlePay, LinkDisplayParams? linkDisplayParams, bool allowsDelayedPaymentMethods, PaymentSheetAppearance? appearance, BillingDetails? billingDetails, bool? allowsRemovalOfLastSavedPaymentMethod, List<String>? paymentMethodOrder, String? returnURL, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? removeSavedPaymentMethodMessage, List<CardBrand>? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance, CardFundingFiltering? cardFundingFiltering, CustomPaymentMethodConfiguration? customPaymentMethodConfiguration, bool? opensCardScannerAutomatically, Map<String, TermsDisplay>? termsDisplay)?, {required TResult orElse()}) → TResult

Available on SetupPaymentSheetParameters, provided by the SetupPaymentSheetParametersPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(bool customFlow, String? customerId, String? primaryButtonLabel, String? customerEphemeralKeySecret, String? customerSessionClientSecret, String? paymentIntentClientSecret, String? setupIntentClientSecret, IntentConfiguration? intentConfiguration, String? merchantDisplayName, PaymentSheetApplePay? applePay, ThemeMode? style, PaymentSheetGooglePay? googlePay, LinkDisplayParams? linkDisplayParams, bool allowsDelayedPaymentMethods, PaymentSheetAppearance? appearance, BillingDetails? billingDetails, bool? allowsRemovalOfLastSavedPaymentMethod, List<String>? paymentMethodOrder, String? returnURL, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? removeSavedPaymentMethodMessage, List<CardBrand>? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance, CardFundingFiltering? cardFundingFiltering, CustomPaymentMethodConfiguration? customPaymentMethodConfiguration, bool? opensCardScannerAutomatically, Map<String, TermsDisplay>? termsDisplay)) → TResult

Available on SetupPaymentSheetParameters, provided by the SetupPaymentSheetParametersPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(bool customFlow, String? customerId, String? primaryButtonLabel, String? customerEphemeralKeySecret, String? customerSessionClientSecret, String? paymentIntentClientSecret, String? setupIntentClientSecret, IntentConfiguration? intentConfiguration, String? merchantDisplayName, PaymentSheetApplePay? applePay, ThemeMode? style, PaymentSheetGooglePay? googlePay, LinkDisplayParams? linkDisplayParams, bool allowsDelayedPaymentMethods, PaymentSheetAppearance? appearance, BillingDetails? billingDetails, bool? allowsRemovalOfLastSavedPaymentMethod, List<String>? paymentMethodOrder, String? returnURL, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? removeSavedPaymentMethodMessage, List<CardBrand>? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance, CardFundingFiltering? cardFundingFiltering, CustomPaymentMethodConfiguration? customPaymentMethodConfiguration, bool? opensCardScannerAutomatically, Map<String, TermsDisplay>? termsDisplay)?) → TResult?

Available on SetupPaymentSheetParameters, provided by the SetupPaymentSheetParametersPatterns extension

A variant of when that fallback to returning null