David PHAM-VAN

Fix Text alignment

1 # Changelog 1 # Changelog
2 2
  3 +## 1.3.22
  4 +
  5 +- Fix Text alignment
  6 +
3 ## 1.3.21 7 ## 1.3.21
4 8
5 - Add TextDecoration 9 - Add TextDecoration
@@ -530,7 +530,8 @@ class RichText extends Widget { @@ -530,7 +530,8 @@ class RichText extends Widget {
530 spanStart += spanCount; 530 spanStart += spanCount;
531 decorationStart = _decorations.length; 531 decorationStart = _decorations.length;
532 532
533 - if (maxLines != null && ++lines > maxLines) { 533 + lines++;
  534 + if (maxLines != null && lines > maxLines) {
534 break; 535 break;
535 } 536 }
536 537
@@ -603,7 +604,8 @@ class RichText extends Widget { @@ -603,7 +604,8 @@ class RichText extends Widget {
603 ); 604 );
604 } 605 }
605 606
606 - if (maxLines != null && ++lines > maxLines) { 607 + lines++;
  608 + if (maxLines != null && lines > maxLines) {
607 break; 609 break;
608 } 610 }
609 611
@@ -651,7 +653,8 @@ class RichText extends Widget { @@ -651,7 +653,8 @@ class RichText extends Widget {
651 spanStart += spanCount; 653 spanStart += spanCount;
652 decorationStart = _decorations.length; 654 decorationStart = _decorations.length;
653 655
654 - if (maxLines != null && ++lines > maxLines) { 656 + lines++;
  657 + if (maxLines != null && lines > maxLines) {
655 return false; 658 return false;
656 } 659 }
657 660
@@ -4,7 +4,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl @@ -4,7 +4,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl
4 homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf 4 homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf
5 repository: https://github.com/DavBfr/dart_pdf 5 repository: https://github.com/DavBfr/dart_pdf
6 issue_tracker: https://github.com/DavBfr/dart_pdf/issues 6 issue_tracker: https://github.com/DavBfr/dart_pdf/issues
7 -version: 1.3.21 7 +version: 1.3.22
8 8
9 environment: 9 environment:
10 sdk: ">=2.1.0 <3.0.0" 10 sdk: ">=2.1.0 <3.0.0"