PaymentElementLayout constructor

const PaymentElementLayout({
  1. required PaymentElementLayoutType type,
  2. bool? defaultCollapsed,
  3. bool? radios,
  4. bool? spacedAccordionItems,
  5. int? visibleAccordionItemsCount,
})

Implementation

const factory PaymentElementLayout({
  /// Defines the layout to render the Payment Element.
  required PaymentElementLayoutType type,

  /// 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.
  bool? defaultCollapsed,

  /// Renders each Payment Method with a radio input next to its logo.
  /// The radios visually indicate the current selection of the Payment
  /// Element.
  ///
  /// This property is only applicable to the accordion layout.
  bool? radios,

  /// When true, the Payment Methods renders as standalone buttons
  /// with space in between them.
  /// This property is only applicable to the accordion layout.
  bool? spacedAccordionItems,

  /// 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.
  int? visibleAccordionItemsCount,
}) = _PaymentElementLayout;