getStyleOfItem_Card method
Implementation
TextStyle getStyleOfItem_Card(Object? item, Color foreColorDefaultForItem) {
if (item is XEnumDef) {
if (widget.item_TextStyle != null) {
return widget.item_TextStyle!(item as T)!;
} else {
return XStyles.xStyTextForDescr(textColor: item.textColor);
}
}
var backResolved = getBackColorOfItem_Card(item);
if (backResolved != null) {
if (ThemeData.estimateBrightnessForColor(backResolved) == Brightness.dark) {
return XStyles.xStyTextForDescr(textColor: XColors.foregroundLight);
} else {
return XStyles.xStyTextForDescr(textColor: XColors.foregroundDark);
}
} else if (widget.item_TextStyle == null) {
return XStyles.xStyTextForDescr(textColor: XColors.foregroundLight);
} else {
if (item != null) {
return widget.item_TextStyle!(((item as T)))!;
} else {
return XStyles.xStyTextForDescr(textColor: XColors.foregroundLight);
}
}
}