Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit fee85ab

Browse files
authored
[web] Don't set both color and foreground at the same time (#24828)
1 parent 510d2ab commit fee85ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/web_ui/lib/src/engine/text/canvas_paragraph.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ abstract class StyleNode {
403403
return style;
404404
}
405405

406-
ui.Color get _color;
406+
ui.Color? get _color;
407407
ui.TextDecoration? get _decoration;
408408
ui.Color? get _decorationColor;
409409
ui.TextDecorationStyle? get _decorationStyle;
@@ -439,7 +439,7 @@ class ChildStyleNode extends StyleNode {
439439
// property isn't defined, go to the parent node.
440440

441441
@override
442-
ui.Color get _color => style._color ?? parent._color;
442+
ui.Color? get _color => style._color ?? (_foreground == null ? parent._color : null);
443443

444444
@override
445445
ui.TextDecoration? get _decoration => style._decoration ?? parent._decoration;

0 commit comments

Comments
 (0)