You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/ui/text.dart
+24-12Lines changed: 24 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -256,6 +256,7 @@ Int32List _encodeTextStyle(
256
256
double letterSpacing,
257
257
double wordSpacing,
258
258
double height,
259
+
double leading,
259
260
Locale locale,
260
261
Paint background,
261
262
Paint foreground,
@@ -310,22 +311,26 @@ Int32List _encodeTextStyle(
310
311
result[0] |=1<<12;
311
312
// Passed separately to native.
312
313
}
313
-
if (locale!=null) {
314
+
if (leading!=null) {
314
315
result[0] |=1<<13;
315
316
// Passed separately to native.
316
317
}
317
-
if (background!=null) {
318
+
if (locale!=null) {
318
319
result[0] |=1<<14;
319
320
// Passed separately to native.
320
321
}
321
-
if (foreground!=null) {
322
+
if (background!=null) {
322
323
result[0] |=1<<15;
323
324
// Passed separately to native.
324
325
}
325
-
if (shadows!=null) {
326
+
if (foreground!=null) {
326
327
result[0] |=1<<16;
327
328
// Passed separately to native.
328
329
}
330
+
if (shadows !=null) {
331
+
result[0] |=1<<17;
332
+
// Passed separately to native.
333
+
}
329
334
return result;
330
335
}
331
336
@@ -344,7 +349,8 @@ class TextStyle {
344
349
/// * `letterSpacing`: The amount of space (in logical pixels) to add between each letter.
345
350
/// * `wordSpacing`: The amount of space (in logical pixels) to add at each sequence of white-space (i.e. between each word).
346
351
/// * `textBaseline`: The common baseline that should be aligned between this text span and its parent text span, or, for the root text spans, with the line box.
347
-
/// * `height`: The height of this text span, as a multiple of the font size.
352
+
/// * `height`: The height of this text span, as a multiple of the sum of font size and leading.
353
+
/// * `leading`: Custom leading to use instead of the font-provided leading as a multiple of font size. When null, default font leading will be used. Leading is the additional spacing between lines.
348
354
/// * `locale`: The locale used to select region-specific glyphs.
349
355
/// * `background`: The paint drawn as a background for the text.
350
356
/// * `foreground`: The paint used to draw the text. If this is specified, `color` must be null.
0 commit comments