[web] Don't set both color and foreground at the same time (flutter/engine#24828)

This commit is contained in:
Mouad Debbar 2021-03-05 17:38:19 -08:00 committed by GitHub
parent ee8a5e9bd0
commit a0f418b769

View File

@ -403,7 +403,7 @@ abstract class StyleNode {
return style;
}
ui.Color get _color;
ui.Color? get _color;
ui.TextDecoration? get _decoration;
ui.Color? get _decorationColor;
ui.TextDecorationStyle? get _decorationStyle;
@ -439,7 +439,7 @@ class ChildStyleNode extends StyleNode {
// property isn't defined, go to the parent node.
@override
ui.Color get _color => style._color ?? parent._color;
ui.Color? get _color => style._color ?? (_foreground == null ? parent._color : null);
@override
ui.TextDecoration? get _decoration => style._decoration ?? parent._decoration;