getColoFor_TextAndDecoration method

Color getColoFor_TextAndDecoration({
  1. T? value,
})

Implementation

Color getColoFor_TextAndDecoration({T? value}) {
  if (selectedItem_UI == null) {
    return ThemeData.estimateBrightnessForColor(widget.backgroundColor) == Brightness.dark ? XColors.foregroundLight : XColors.foregroundDark;
  } else {
    // var x = get_Item_BackgroundColor(value ?? selectedItem_UI);
    if (value is XEnumDef) {
      return ThemeData.estimateBrightnessForColor(value.textColor) == Brightness.dark ? XColors.foregroundLight : XColors.foregroundDark;
    } else {}
    return ThemeData.estimateBrightnessForColor(widget.item_BackgroundColor ?? widget.backgroundColor) == Brightness.dark ? XColors.foregroundLight : XColors.foregroundDark;
  }
}