@@ -152,6 +152,16 @@ class Style {
152
152
/// Default: normal (0)
153
153
double wordSpacing;
154
154
155
+ /// CSS attribute "`line-height` "
156
+ ///
157
+ /// Supported values: double values
158
+ ///
159
+ /// Unsupported values: normal, 80%, ..
160
+ ///
161
+ /// Inherited: no,
162
+ /// Default: Unspecified (null),
163
+ double lineHeight;
164
+
155
165
//TODO modify these to match CSS styles
156
166
String before;
157
167
String after;
@@ -170,6 +180,7 @@ class Style {
170
180
this .fontStyle,
171
181
this .fontWeight,
172
182
this .height,
183
+ this .lineHeight,
173
184
this .letterSpacing,
174
185
this .listStyleType,
175
186
this .padding,
@@ -212,9 +223,9 @@ class Style {
212
223
letterSpacing: letterSpacing,
213
224
shadows: textShadow,
214
225
wordSpacing: wordSpacing,
226
+ height: lineHeight,
215
227
//TODO background
216
228
//TODO textBaseline
217
- //TODO height
218
229
);
219
230
}
220
231
@@ -237,6 +248,7 @@ class Style {
237
248
fontStyle: other.fontStyle,
238
249
fontWeight: other.fontWeight,
239
250
height: other.height,
251
+ lineHeight: other.lineHeight,
240
252
letterSpacing: other.letterSpacing,
241
253
listStyleType: other.listStyleType,
242
254
padding: other.padding,
@@ -294,6 +306,7 @@ class Style {
294
306
FontStyle fontStyle,
295
307
FontWeight fontWeight,
296
308
double height,
309
+ double lineHeight,
297
310
double letterSpacing,
298
311
ListStyleType listStyleType,
299
312
EdgeInsets padding,
@@ -325,6 +338,7 @@ class Style {
325
338
fontStyle: fontStyle ?? this .fontStyle,
326
339
fontWeight: fontWeight ?? this .fontWeight,
327
340
height: height ?? this .height,
341
+ lineHeight: lineHeight ?? this .lineHeight,
328
342
letterSpacing: letterSpacing ?? this .letterSpacing,
329
343
listStyleType: listStyleType ?? this .listStyleType,
330
344
padding: padding ?? this .padding,
@@ -363,6 +377,7 @@ class Style {
363
377
this .letterSpacing = textStyle.letterSpacing;
364
378
this .textShadow = textStyle.shadows;
365
379
this .wordSpacing = textStyle.wordSpacing;
380
+ this .lineHeight = textStyle.height;
366
381
}
367
382
}
368
383
0 commit comments