textColor property
Color?
get
textColor
Searches the path to the root for the first occurance of a node with a
color information. Returns null
if no information is present
Implementation
Color? get textColor {
NodeV2? k = this;
while (k != null) {
if (k.styleProperty != null) {
StyleProperty prop = k.styleProperty!;
dynamic color = prop.getProperty("color");
if (color != null) {
try {
return ColorUtils.colorForHex(color);
} catch (e) {
return TextConstants.defaultColor;
}
}
}
k = k.parent;
}
return null;
}