Showing
1 changed file
with
3 additions
and
7 deletions
@@ -505,13 +505,9 @@ class _Line { | @@ -505,13 +505,9 @@ class _Line { | ||
505 | 505 | ||
506 | double get height { | 506 | double get height { |
507 | final list = parent._spans.sublist(firstSpan, lastSpan); | 507 | final list = parent._spans.sublist(firstSpan, lastSpan); |
508 | - if (list.length > 0) { | ||
509 | - return list | ||
510 | - .reduce((a, b) => a.height > b.height ? a : b) | ||
511 | - .height; | ||
512 | - } else { | ||
513 | - return 0; | ||
514 | - } | 508 | + return list.isEmpty |
509 | + ? 0 | ||
510 | + : list.reduce((a, b) => a.height > b.height ? a : b).height; | ||
515 | } | 511 | } |
516 | 512 | ||
517 | @override | 513 | @override |
-
Please register or login to post a comment