xBuilder_XMenu method

dynamic xBuilder_XMenu(
  1. dynamic tabController(),
  2. dynamic onPinned(),
  3. bool pinned_Value
)

Implementation

xBuilder_XMenu(Function() tabController, Function() onPinned, bool pinned_Value) {
  return XfxMenu(
    widget.xApp.liXMenus, tabController,
    KforScale_UI_edit,
    logOut_Visible: widget.logOUT_Active,
    bottomArea_Widget: widget.bottomArea_Widget,
    firstSessionIsView: widget.xApp.state.area_Active.key_Area != "",
    snackBar_Visible: snackBar_Visible,
    functOnSync: syncWithServer == false
        ? () async {
            setState(() {
              syncWithServer = true;
            });
            await syncronizeDataFromServer().then((value) async {
              setState(() {
                snackBar_Visible = true;
              });
              await Timer(Duration(seconds: 2), () {
                setState(() {
                  snackBar_Visible = false;
                });
              });
            });
            ;
            setState(() {
              syncWithServer = false;
            });

            // XAlertDialog.alertClose(context, titleText: "Aggiornati con successo i dati dal server", titleStyle: XStyles.xStyTextForSubLabel(XColors.warning));
          }
        : null,
    title: widget.title,

    xApp: widget.xApp,
    padding: EdgeInsets.symmetric(vertical: 10),
    logOut_OnTap: () async {
      var x = await warnLogOff(context);
      if (x) {
        if (widget.xApp.state.area_Active.key_Area != "") {
          Navigator.pop(context);
          Navigator.pop(context);
        } else {
          Navigator.pop(context);
        }
      }
    },
    title_Style: XStyles.xStyTextForLargeTitle(textColor: Colors.white),
    menu_BackGroundColor: Colors.grey[900],
    onPressed_PinnedBTN: () {
      if (widget.xApp.state.li_XAree.isEmpty) {
      } else {
        onPinned();
      }
    },
    pinned_Value: pinned_Value,
    syncWithServer: syncWithServer,
    onPressed_MenuItem: (i) => widget.xApp.state.homeLayoutComplex ? null : checkActive_Area(i),
    // nameApp: Text(sex.app_Name, style: XStyles.xStyTextForLabel()),
  );
}