@@ -177,8 +177,8 @@ class Style {
177177 /// CSS attribute "`vertical-align` "
178178 ///
179179 /// Inherited: no,
180- /// Default: VerticalAlign.BASELINE ,
181- VerticalAlign ? verticalAlign;
180+ /// Default: VerticalAlign.baseline ,
181+ VerticalAlign verticalAlign;
182182
183183 /// CSS attribute "`white-space` "
184184 ///
@@ -259,7 +259,7 @@ class Style {
259259 this .textDecorationStyle,
260260 this .textDecorationThickness,
261261 this .textShadow,
262- this .verticalAlign,
262+ this .verticalAlign = VerticalAlign .baseline ,
263263 this .whiteSpace,
264264 this .width,
265265 this .wordSpacing,
@@ -503,25 +503,26 @@ class Style {
503503 );
504504 }
505505
506- Style .fromTextStyle (TextStyle textStyle) {
507- backgroundColor = textStyle.backgroundColor;
508- color = textStyle.color;
509- textDecoration = textStyle.decoration;
510- textDecorationColor = textStyle.decorationColor;
511- textDecorationStyle = textStyle.decorationStyle;
512- textDecorationThickness = textStyle.decorationThickness;
513- fontFamily = textStyle.fontFamily;
514- fontFamilyFallback = textStyle.fontFamilyFallback;
515- fontFeatureSettings = textStyle.fontFeatures;
516- fontSize =
517- textStyle.fontSize != null ? FontSize (textStyle.fontSize! ) : null ;
518- fontStyle = textStyle.fontStyle;
519- fontWeight = textStyle.fontWeight;
520- letterSpacing = textStyle.letterSpacing;
521- textShadow = textStyle.shadows;
522- wordSpacing = textStyle.wordSpacing;
523- lineHeight = LineHeight (textStyle.height ?? 1.2 );
524- textTransform = TextTransform .none;
506+ factory Style .fromTextStyle (TextStyle textStyle) {
507+ return Style (
508+ backgroundColor: textStyle.backgroundColor,
509+ color: textStyle.color,
510+ textDecoration: textStyle.decoration,
511+ textDecorationColor: textStyle.decorationColor,
512+ textDecorationStyle: textStyle.decorationStyle,
513+ textDecorationThickness: textStyle.decorationThickness,
514+ fontFamily: textStyle.fontFamily,
515+ fontFamilyFallback: textStyle.fontFamilyFallback,
516+ fontFeatureSettings: textStyle.fontFeatures,
517+ fontSize:
518+ textStyle.fontSize != null ? FontSize (textStyle.fontSize! ) : null ,
519+ fontStyle: textStyle.fontStyle,
520+ fontWeight: textStyle.fontWeight,
521+ letterSpacing: textStyle.letterSpacing,
522+ textShadow: textStyle.shadows,
523+ wordSpacing: textStyle.wordSpacing,
524+ lineHeight: LineHeight (textStyle.height ?? 1.2 ),
525+ );
525526 }
526527
527528 /// Sets any dimensions set to rem or em to the computed size
0 commit comments