toFlutterTextStyle method

TextStyle toFlutterTextStyle({
  1. DrawablePaint? foregroundOverride,
})

Creates a Flutter TextStyle, overriding the foreground if specified.

Implementation

TextStyle toFlutterTextStyle({DrawablePaint? foregroundOverride}) {
  return TextStyle(
    decoration: decoration,
    decorationColor: decorationColor,
    decorationStyle: decorationStyle,
    fontWeight: fontWeight,
    fontStyle: fontStyle,
    textBaseline: textBaseline,
    fontFamily: fontFamily,
    fontSize: fontSize,
    letterSpacing: letterSpacing,
    wordSpacing: wordSpacing,
    height: height,
    locale: locale,
    background: background?.toFlutterPaint(),
    foreground:
        foregroundOverride?.toFlutterPaint() ?? foreground?.toFlutterPaint(),
  );
}