David PHAM-VAN

Fix Color.toHex()

@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 ## 3.10.0 3 ## 3.10.0
4 4
5 - Apply BoxShape and BorderRadius to selected Checkbox [Joseph Grabinger] 5 - Apply BoxShape and BorderRadius to selected Checkbox [Joseph Grabinger]
  6 +- Fix Color.toHex()
6 7
7 ## 3.9.0 8 ## 3.9.0
8 9
@@ -153,8 +153,8 @@ class PdfColor { @@ -153,8 +153,8 @@ class PdfColor {
153 /// Get an Hexadecimal representation of this color 153 /// Get an Hexadecimal representation of this color
154 String toHex() { 154 String toHex() {
155 final i = toInt(); 155 final i = toInt();
156 - final rgb = (i & 0xffffff).toRadixString(16);  
157 - final a = ((i & 0xff000000) >> 24).toRadixString(16); 156 + final rgb = (i & 0xffffff).toRadixString(16).padLeft(6, '0');
  157 + final a = ((i & 0xff000000) >> 24).toRadixString(16).padLeft(2, '0');
158 return '#$rgb$a'; 158 return '#$rgb$a';
159 } 159 }
160 160
No preview for this file type