PaymentElementLayout class

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.

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>
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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

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