Showing
2 changed files
with
23 additions
and
19 deletions
@@ -165,20 +165,21 @@ class Paragraph extends StatelessWidget { | @@ -165,20 +165,21 @@ class Paragraph extends StatelessWidget { | ||
165 | } | 165 | } |
166 | 166 | ||
167 | class Bullet extends StatelessWidget { | 167 | class Bullet extends StatelessWidget { |
168 | - Bullet( | ||
169 | - {this.text, | ||
170 | - this.textAlign = TextAlign.left, | ||
171 | - this.style, | ||
172 | - this.margin = const EdgeInsets.only(bottom: 2.0 * PdfPageFormat.mm), | ||
173 | - this.padding, | ||
174 | - this.bulletSize = 2.0 * PdfPageFormat.mm, | ||
175 | - this.bulletMargin = const EdgeInsets.only( | ||
176 | - top: 1.5 * PdfPageFormat.mm, | ||
177 | - left: 5.0 * PdfPageFormat.mm, | ||
178 | - right: 2.0 * PdfPageFormat.mm, | ||
179 | - ), | ||
180 | - this.bulletShape = BoxShape.circle, | ||
181 | - this.bulletColor = PdfColors.black}); | 168 | + Bullet({ |
169 | + this.text, | ||
170 | + this.textAlign = TextAlign.left, | ||
171 | + this.style, | ||
172 | + this.margin = const EdgeInsets.only(bottom: 2.0 * PdfPageFormat.mm), | ||
173 | + this.padding, | ||
174 | + this.bulletSize = 2.0 * PdfPageFormat.mm, | ||
175 | + this.bulletMargin = const EdgeInsets.only( | ||
176 | + top: 1.5 * PdfPageFormat.mm, | ||
177 | + left: 5.0 * PdfPageFormat.mm, | ||
178 | + right: 2.0 * PdfPageFormat.mm, | ||
179 | + ), | ||
180 | + this.bulletShape = BoxShape.circle, | ||
181 | + this.bulletColor = PdfColors.black, | ||
182 | + }); | ||
182 | 183 | ||
183 | final String? text; | 184 | final String? text; |
184 | 185 | ||
@@ -213,11 +214,13 @@ class Bullet extends StatelessWidget { | @@ -213,11 +214,13 @@ class Bullet extends StatelessWidget { | ||
213 | decoration: BoxDecoration(color: bulletColor, shape: bulletShape), | 214 | decoration: BoxDecoration(color: bulletColor, shape: bulletShape), |
214 | ), | 215 | ), |
215 | Expanded( | 216 | Expanded( |
216 | - child: Text( | ||
217 | - text!, | ||
218 | - textAlign: textAlign, | ||
219 | - style: Theme.of(context).bulletStyle.merge(style), | ||
220 | - ), | 217 | + child: text == null |
218 | + ? SizedBox() | ||
219 | + : Text( | ||
220 | + text!, | ||
221 | + textAlign: textAlign, | ||
222 | + style: Theme.of(context).bulletStyle.merge(style), | ||
223 | + ), | ||
221 | ) | 224 | ) |
222 | ], | 225 | ], |
223 | ), | 226 | ), |
-
Please register or login to post a comment