@@ -177,8 +177,8 @@ class Style {
177
177
/// CSS attribute "`vertical-align` "
178
178
///
179
179
/// Inherited: no,
180
- /// Default: VerticalAlign.BASELINE ,
181
- VerticalAlign ? verticalAlign;
180
+ /// Default: VerticalAlign.baseline ,
181
+ VerticalAlign verticalAlign;
182
182
183
183
/// CSS attribute "`white-space` "
184
184
///
@@ -259,7 +259,7 @@ class Style {
259
259
this .textDecorationStyle,
260
260
this .textDecorationThickness,
261
261
this .textShadow,
262
- this .verticalAlign,
262
+ this .verticalAlign = VerticalAlign .baseline ,
263
263
this .whiteSpace,
264
264
this .width,
265
265
this .wordSpacing,
@@ -503,25 +503,26 @@ class Style {
503
503
);
504
504
}
505
505
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
+ );
525
526
}
526
527
527
528
/// Sets any dimensions set to rem or em to the computed size
0 commit comments