Style.fromTextStyle constructor

Style.fromTextStyle(
  1. TextStyle textStyle
)

Implementation

Style.fromTextStyle(TextStyle textStyle) {
  this.backgroundColor = textStyle.backgroundColor;
  this.color = textStyle.color;
  this.textDecoration = textStyle.decoration;
  this.textDecorationColor = textStyle.decorationColor;
  this.textDecorationStyle = textStyle.decorationStyle;
  this.textDecorationThickness = textStyle.decorationThickness;
  this.fontFamily = textStyle.fontFamily;
  this.fontFeatureSettings = textStyle.fontFeatures;
  this.fontSize = FontSize(textStyle.fontSize);
  this.fontStyle = textStyle.fontStyle;
  this.fontWeight = textStyle.fontWeight;
  this.letterSpacing = textStyle.letterSpacing;
  this.textShadow = textStyle.shadows;
  this.wordSpacing = textStyle.wordSpacing;
  this.lineHeight = LineHeight(textStyle.height ?? 1.2);
}