createOptions method
CardElementOptions
createOptions()
Implementation
js.CardElementOptions createOptions() {
final textColor = widget.style?.textColor == null
? null
: colorToCssString(widget.style!.textColor!);
final backgroundColor = widget.style?.backgroundColor == null
? null
: colorToCssString(widget.style!.backgroundColor!);
final placeholderColor = widget.style?.placeholderColor == null
? null
: colorToCssString(widget.style!.placeholderColor!);
return js.CardElementOptions(
style: {
'base': {
'color': ?textColor,
'backgroundColor': ?backgroundColor,
if (placeholderColor != null) '::placeholder': {'color': placeholderColor},
},
},
hidePostalCode: !widget.enablePostalCode,
);
}