from static method

TextStyleData from(
  1. TextStyle style
)

Implementation

static TextStyleData from(TextStyle style) {
  return style is TextStyleRef
      ? TextStyleData.tokenRef(style)
      : TextStyleData(
          background: style.background,
          backgroundColor: style.backgroundColor?.toDto(),
          color: style.color?.toDto(),
          debugLabel: style.debugLabel,
          decoration: style.decoration,
          decorationColor: style.decorationColor?.toDto(),
          decorationStyle: style.decorationStyle,
          decorationThickness: style.decorationThickness,
          fontFamily: style.fontFamily,
          fontFamilyFallback: style.fontFamilyFallback,
          fontFeatures: style.fontFeatures,
          fontSize: style.fontSize,
          fontStyle: style.fontStyle,
          fontWeight: style.fontWeight,
          foreground: style.foreground,
          height: style.height,
          letterSpacing: style.letterSpacing,
          locale: style.locale,
          shadows: style.shadows?.map((e) => e.toDto()).toList(),
          textBaseline: style.textBaseline,
          wordSpacing: style.wordSpacing,
        );
}