PaymentElement constructor
PaymentElement({
- required CardChangedCallback onCardChanged,
- Key? key,
- CardFocusCallback? onFocus,
- CardStyle? style,
- CardPlaceholder? placeholder,
- bool enablePostalCode = false,
- double? width,
- double? height = kCardFieldDefaultHeight,
- BoxConstraints? constraints,
- FocusNode? focusNode,
- required String clientSecret,
- bool autofocus = false,
- PaymentElementLayout layout = PaymentElementLayout.accordion,
- ElementAppearance? appearance,
Implementation
PaymentElement({
required this.onCardChanged,
Key? key,
this.onFocus,
this.style,
this.placeholder,
this.enablePostalCode = false,
double? width,
double? height = kCardFieldDefaultHeight,
BoxConstraints? constraints,
this.focusNode,
required this.clientSecret,
this.autofocus = false,
this.layout = PaymentElementLayout.accordion,
this.appearance,
}) : assert(constraints == null || constraints.debugAssertIsValid()),
constraints = (width != null || height != null)
? constraints?.tighten(width: width, height: height) ??
BoxConstraints.tightFor(width: width, height: height)
: constraints,
super(key: key);