xBottomBarAction_OnTap method

dynamic xBottomBarAction_OnTap(
  1. int currentIdx,
  2. XBottomNavigationBarItem act,
  3. void parentSetState(
    1. void ()
    )
)

Implementation

xBottomBarAction_OnTap(int currentIdx, XBottomNavigationBarItem act, void Function(void Function()) parentSetState) async {
  var act = liBottomActions[currentIdx];
  if (act.wKey == "saveExit") {
    setState(() {
      waiterMessage = "Sto salvando i tuoi dati..";
      isBusy = true;
    });
    xcmd_Save();
    await xOnSaveAfter();
    setState(() {
      waiterMessage = "";
      isBusy = false;
    });
    Navigator.pop(context, widget.itemInEdit);
  } else if (act.wKey == "save") {
    setState(() {
      waiterMessage = "Sto salvando i tuoi dati..";
      isBusy = true;
    });
    xcmd_Save();
    await xOnSaveAfter();
    setState(() {
      waiterMessage = "";
      isBusy = false;
    });
  }
  if (act.wKey == "addDett") {
    _OnAddNewDett();
  }
}