Style.fromTextStyle constructor

Style.fromTextStyle(
  1. TextStyle textStyle
)

Implementation

Style.fromTextStyle(TextStyle textStyle) {
  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 = FontSize(textStyle.fontSize);
  fontStyle = textStyle.fontStyle;
  fontWeight = textStyle.fontWeight;
  letterSpacing = textStyle.letterSpacing;
  textShadow = textStyle.shadows;
  wordSpacing = textStyle.wordSpacing;
  lineHeight = LineHeight(textStyle.height ?? 1.2);
  textTransform = TextTransform.none;
}