CheckoutPatterns extension

Adds pattern-matching-related methods to Checkout.

on

Methods

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

Available on Checkout, provided by the CheckoutPatterns extension

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

Available on Checkout, provided by the CheckoutPatterns extension

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

Available on Checkout, provided by the CheckoutPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, bool ready, AvailableShippingRates? availableShippingRates, String createdAt, String currencyCode, PriceV2 totalTaxV2, PriceV2 totalPriceV2, bool taxesIncluded, bool taxExempt, PriceV2 subtotalPriceV2, bool requiresShipping, List<AppliedGiftCards> appliedGiftCards, List<LineItem> lineItems, Order? order, String? orderStatusUrl, String? shopifyPaymentsAccountId, MailingAddress? shippingAddress, ShippingRates? shippingLine, String? email, String? completedAt, String? note, String? webUrl, String? updatedAt)?, {required TResult orElse()}) → TResult

Available on Checkout, provided by the CheckoutPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(String id, bool ready, AvailableShippingRates? availableShippingRates, String createdAt, String currencyCode, PriceV2 totalTaxV2, PriceV2 totalPriceV2, bool taxesIncluded, bool taxExempt, PriceV2 subtotalPriceV2, bool requiresShipping, List<AppliedGiftCards> appliedGiftCards, List<LineItem> lineItems, Order? order, String? orderStatusUrl, String? shopifyPaymentsAccountId, MailingAddress? shippingAddress, ShippingRates? shippingLine, String? email, String? completedAt, String? note, String? webUrl, String? updatedAt)) → TResult

Available on Checkout, provided by the CheckoutPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, bool ready, AvailableShippingRates? availableShippingRates, String createdAt, String currencyCode, PriceV2 totalTaxV2, PriceV2 totalPriceV2, bool taxesIncluded, bool taxExempt, PriceV2 subtotalPriceV2, bool requiresShipping, List<AppliedGiftCards> appliedGiftCards, List<LineItem> lineItems, Order? order, String? orderStatusUrl, String? shopifyPaymentsAccountId, MailingAddress? shippingAddress, ShippingRates? shippingLine, String? email, String? completedAt, String? note, String? webUrl, String? updatedAt)?) → TResult?

Available on Checkout, provided by the CheckoutPatterns extension

A variant of when that fallback to returning null