resolveColor static method
Implementation
static CSSColor? resolveColor(String color, RenderStyle renderStyle, String propertyName) {
if (color == CURRENT_COLOR) {
if (propertyName == COLOR) {
return null;
}
// Update property that deps current color.
renderStyle.addColorRelativeProperty(propertyName);
return renderStyle.color;
}
Color? value = parseColor(color, renderStyle: renderStyle);
if (value == null) {
return null;
}
return CSSColor(value);
}