xEditDialog_Builder_BTNs method

XBtnbase xEditDialog_Builder_BTNs(
  1. XFDataItem item,
  2. TextEditingController controller,
  3. String valueAndLabel,
  4. bool isSconto,
  5. void parentSetState(
    1. void ()
    ), {
  6. XCol? xCol,
})

Builder dei bottoni cher verranno visualizzati nell'XEditDialog

Implementation

XBtnbase xEditDialog_Builder_BTNs(XFDataItem item, TextEditingController controller, String valueAndLabel, bool isSconto, void Function(void Function()) parentSetState, {XCol? xCol}) {
  return XBtnbase(
      padding: EdgeInsets.all(1),
      width: 45 * XUtils.kforScale,
      label_Style: XStyles.xStyTextForSubLabel(
          textColor: valueAndLabel.contains("+")
              ? Colors.green
              : valueAndLabel.contains("-") || valueAndLabel == ("C")
                  ? Colors.red
                  : Colors.green),
      label: valueAndLabel,
      backGroundColor: Colors.grey[700],
      onPressed: () {
        if (valueAndLabel == "C") {
          controller.text = "";
          FocusScope.of(context).unfocus();
        }
      });
}