xBuilder_Menu method

dynamic xBuilder_Menu(
  1. Color foreColorDefaultForItem
)
inherited

Implementation

xBuilder_Menu(Color foreColorDefaultForItem) {
  var color = widget.menu_SearchBoxBorderANDtitle_Color ?? (widget.background_Color == null ? XColors.foregroundLight : (ThemeData.estimateBrightnessForColor(alphaBlend(widget.background_Color!(widget.itemSelected)!)) == Brightness.dark ? XColors.foregroundDark : XColors.foregroundLight));
  return PopupProps.menu(
      constraints: BoxConstraints(minHeight: 80, maxHeight: widget.menu_height ?? 350, maxWidth: widget.width ?? MediaQuery.of(context).size.width / 0.7),
      searchFieldProps: TextFieldProps(scrollPadding: EdgeInsets.symmetric(vertical: 3, horizontal: 5), style: XStyles.xStyTextForLargeTitle(textColor: color), padding: EdgeInsets.symmetric(vertical: 3, horizontal: 5), decoration: inputDecorationDD_searchBox(colorBorderANDlabelForSearchBox: widget.menu_SearchBoxBorderANDtitle_Color)),
      menuProps: MenuProps(backgroundColor: (widget.menu_BackGroundColor ?? widget.al_BackGroundColor ?? (widget.background_Color != null ? widget.background_Color!(null) : Colors.grey[900]))),
      fit: FlexFit.loose,
      // textStyle: widget.item_TextStyle ?? XStyles.xStyTextForDescr(widget.menu_Title_Color ?? Colors.white),
      showSearchBox: widget.menu_SearchBox_Active ?? widget.liItems.length > 14 ? true : false,
      listViewProps: ListViewProps(controller: ScrollController()),
      title: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
        Container(
          margin: EdgeInsets.only(top: 7, bottom: 7),
          child: Text(widget.menu_Title ?? widget.label ?? "<No Title>", style: widget.menu_Title_Style ?? XStyles.xStyTextForDescr(textColor: widget.menu_Title_Color ?? widget.menu_SearchBoxBorderANDtitle_Color ?? getColoFor_TextAndDecoration())),
        )
      ]),
      // showSelectedItems: true,
      itemBuilder: widget.itemWidgetBuilder != null
          ? widget.itemWidgetBuilder
          : ((context, item, isSelected) {
              return Card(
                  child: Container(
                      color: getBackColorOfItem_Card(item),
                      padding: EdgeInsets.symmetric(vertical: 5, horizontal: 10),
                      alignment: widget.item_TextAlignment ?? Alignment.centerLeft,
                      child: Text(
                        itemAsString_internal(item),
                        maxLines: 3,
                        overflow: TextOverflow.ellipsis,
                        style: getStyleOfItem_Card(item, foreColorDefaultForItem),
                      )));
            }));
}