Style.fromTextStyle constructor
Style.fromTextStyle(
- TextStyle textStyle
Implementation
factory Style.fromTextStyle(TextStyle textStyle) {
return Style(
backgroundColor: textStyle.backgroundColor,
color: textStyle.color,
textDecoration: textStyle.decoration,
textDecorationColor: textStyle.decorationColor,
textDecorationStyle: textStyle.decorationStyle,
textDecorationThickness: textStyle.decorationThickness,
fontFamily: textStyle.fontFamily,
fontFamilyFallback: textStyle.fontFamilyFallback,
fontFeatureSettings: textStyle.fontFeatures,
fontSize:
textStyle.fontSize != null ? FontSize(textStyle.fontSize!) : null,
fontStyle: textStyle.fontStyle,
fontWeight: textStyle.fontWeight,
letterSpacing: textStyle.letterSpacing,
textShadow: textStyle.shadows,
wordSpacing: textStyle.wordSpacing,
lineHeight: LineHeight(textStyle.height ?? 1.2),
);
}