createElementOptions method

JsElementsCreateOptions createElementOptions()

Implementation

js.JsElementsCreateOptions createElementOptions() {
  final textColor = widget.style?.textColor;
  return js.JsElementsCreateOptions(
    appearance:
        js.ElementAppearance(
              theme: js.ElementTheme.stripe,
              variables: {
                if (textColor != null)
                  'colorText': colorToCssString(textColor),
              },
            ).toJson().jsify()
            as js.JsElementAppearance,
  );
}