@@ -294,15 +294,15 @@ class UnorderedListItemComponentViewModel extends ListItemComponentViewModel {
294
294
super .spellingErrors,
295
295
});
296
296
297
- ListItemDotStyle dotStyle = const ListItemDotStyle () ;
297
+ ListItemDotStyle dotStyle;
298
298
299
299
@override
300
300
void applyStyles (Map <String , dynamic > styles) {
301
301
super .applyStyles (styles);
302
- dotStyle = ListItemDotStyle (
302
+ dotStyle = dotStyle. copyWith (
303
303
color: styles[Styles .dotColor],
304
- shape: styles[Styles .dotShape] ?? BoxShape .circle ,
305
- size: styles[Styles .dotSize] ?? const Size ( 4 , 4 ) ,
304
+ shape: styles[Styles .dotShape],
305
+ size: styles[Styles .dotSize],
306
306
);
307
307
}
308
308
@@ -365,7 +365,7 @@ class OrderedListItemComponentViewModel extends ListItemComponentViewModel {
365
365
@override
366
366
void applyStyles (Map <String , dynamic > styles) {
367
367
super .applyStyles (styles);
368
- numeralStyle = styles[Styles .listNumeralStyle] ?? OrderedListNumeralStyle .arabic ;
368
+ numeralStyle = styles[Styles .listNumeralStyle] ?? numeralStyle ;
369
369
}
370
370
371
371
@override
@@ -413,6 +413,20 @@ class ListItemDotStyle {
413
413
final BoxShape shape;
414
414
final Size size;
415
415
416
+ /// Returns a copy of this [ListItemDotStyle] with optional new values
417
+ /// for [color] , [shape] , and [size] .
418
+ ListItemDotStyle copyWith ({
419
+ Color ? color,
420
+ BoxShape ? shape,
421
+ Size ? size,
422
+ }) {
423
+ return ListItemDotStyle (
424
+ color: color ?? this .color,
425
+ shape: shape ?? this .shape,
426
+ size: size ?? this .size,
427
+ );
428
+ }
429
+
416
430
@override
417
431
bool operator == (Object other) =>
418
432
identical (this , other) ||
0 commit comments