PaymentElementLayout class abstract

Specify the layout for the Payment Element. If you only pass a layout type ('accordion' or ‘tabs’) without any additional parameters, t he Payment Element renders using that layout and the default values associated with it.

An PaymentElementLayout can also be passed to specify the layout with additional configuration.

Available extensions
Annotations
  • @freezed

Constructors

PaymentElementLayout({required PaymentElementLayoutType type, bool? defaultCollapsed, bool? radios, bool? spacedAccordionItems, int? visibleAccordionItemsCount})
const
factory
PaymentElementLayout.fromJson(Map<String, dynamic> json)
factory

Properties

copyWith → $PaymentElementLayoutCopyWith<PaymentElementLayout>
Create a copy of PaymentElementLayout with the given fields replaced by the non-null parameter values.
no setterinherited
defaultCollapsed → bool?
Controls if the Payment Element renders in a collapsed state (where no payment method is selected by default). When you leave this `undefined``, Stripe renders the experience that it determines will have the best conversion.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
radios → bool?
Renders each Payment Method with a radio input next to its logo. The radios visually indicate the current selection of the Payment Element.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spacedAccordionItems → bool?
When true, the Payment Methods renders as standalone buttons with space in between them. This property is only applicable to the accordion layout.
no setterinherited
type → PaymentElementLayoutType
Defines the layout to render the Payment Element.
no setterinherited
visibleAccordionItemsCount → int?
Sets the max number of Payment Methods visible before using the "More" button to hide additional Payment Methods. Set this value to 0 to disable the "More" button and render all available Payment Methods. Default is 5. This property is only applicable to the accordion layout.
no setterinherited

Methods

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

Available on PaymentElementLayout, provided by the PaymentElementLayoutPatterns extension

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

Available on PaymentElementLayout, provided by the PaymentElementLayoutPatterns extension

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

Available on PaymentElementLayout, provided by the PaymentElementLayoutPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(PaymentElementLayoutType type, bool? defaultCollapsed, bool? radios, bool? spacedAccordionItems, int? visibleAccordionItemsCount)?, {required TResult orElse()}) → TResult

Available on PaymentElementLayout, provided by the PaymentElementLayoutPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this PaymentElementLayout to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(PaymentElementLayoutType type, bool? defaultCollapsed, bool? radios, bool? spacedAccordionItems, int? visibleAccordionItemsCount)) → TResult

Available on PaymentElementLayout, provided by the PaymentElementLayoutPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(PaymentElementLayoutType type, bool? defaultCollapsed, bool? radios, bool? spacedAccordionItems, int? visibleAccordionItemsCount)?) → TResult?

Available on PaymentElementLayout, provided by the PaymentElementLayoutPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) → bool
The equality operator.
inherited