xLayout_xFilter_Builder_SingleXDropDown method

dynamic xLayout_xFilter_Builder_SingleXDropDown(
  1. XFilterEl xFilter
)

Override per cambiare la build del singolo Filtro a DropDown

Implementation

xLayout_xFilter_Builder_SingleXDropDown(XFilterEl<dynamic> xFilter) {
  return StatefulBuilder(builder: (context, state) {
    return Container(
        width: ((xFilter.width ?? 200) * widget.xApp!.KforScale) < 170 ? 170 : (xFilter.width ?? 200) * widget.xApp!.KforScale,
        child: XfxDropDown<dynamic>(xFilter.ColsOfXFdataItemToShow,
            label: "",
            menu_SearchBoxBorderANDtitle_Color: ThemeData.estimateBrightnessForColor(xFilter.backgroundMenuColor ?? xFilter.xPropOfItemToFilter.col_Color) == Brightness.dark ? XColors.foregroundLight : XColors.foregroundDark,
            menu_height: xFilter.menu_height,
            background_Color: (value) => xFilter.backgroundMenuColor ?? xFilter.xPropOfItemToFilter.col_Color,
            liItems: xFilter.Items,
            itemSelected: xFilter.Value,
            label_Behavior: FloatingLabelBehavior.auto,
            item_TextStyle: (p0) => xFilter.textStyle != null
                ? xFilter.textStyle!(p0) //
                : xFilter.Value is XEnumDef
                    ? XStyles.xStyTextForTitle(textColor: ThemeData.estimateBrightnessForColor((xFilter.Value as XEnumDef).backColor) == Brightness.dark ? XColors.foregroundLight : XColors.foregroundDark)
                    : XStyles.xStyTextForTitle(textColor: XColors.foregroundLight),
            item_LabelStyle: (p0) => xFilter.textStyle != null ? xFilter.textStyle!(p0) : XStyles.xStyTextForTitle(textColor: p0),
            clearBTN_Active: xFilter.All != null && xFilter.Value != xFilter.All,
            onChanged_ItemOfDD: (value) => setState(() => state(() => xFilter.Value = value == null ? xFilter.All : value))));
  });
}