xLayout_EditBTN_Widget method

Widget xLayout_EditBTN_Widget(
  1. XFDataItem item,
  2. bool dett_Active,
  3. void parentSetState(
    1. void ()
    ),
  4. XView xView_Elenco, {
  5. String? title,
})

Override per cambiare il Bottone di Edit dell'ItemComplex dell'Elenco

Implementation

Widget xLayout_EditBTN_Widget(XFDataItem item, bool dett_Active, void Function(void Function()) parentSetState, XView xView_Elenco, {String? title}) {
  return Container(
      child: XBtnbase(
          height: 40,
          width: 40,
          icon_WidthArea: 30,
          label_Style: XStyles.xStyTextForSubLabel(textColor: Colors.yellow),
          icon: Icons.edit,
          icon_Size: 23,
          icon_Color: Colors.yellow,
          toolTip_Message: "Modifica questa riga",
          onPressed: () async {
            var res = await xPreview_Dialog(widget.xView_ForEditItem ?? xView_Elenco, item);
            if (res != null) {
              item = res.getCloneFull();
              if (item is K)
                widget.rootItemEdited != null ? widget.rootItemEdited!(item as K) : null;
              else
                widget.itemEdited != null ? widget.itemEdited!(item) : null;
            }
          }));
}