tabsChangeActive method
Implementation
tabsChangeActive(String li_ColKey, String tabKey) {
setState(() {
// var tbCtrl = context.findAncestorStateOfType<XfxSchedaTabbedState>();
int idx;
var tabForKey = xTabs.value.firstWhereOrNull((element) => element.caption == tabKey);
if (tabForKey == null) {
idx = xTabs.value.length;
currentTabIndex = idx;
xTabs.value.add(XTabItem(
idx,
tabKey,
tabKey,
content: tabViewPages(widget.xView.cols.firstWhere((element) => element.colKey == li_ColKey)),
labelColor_Active: widget.title_BackColor,
labelColor_Disabled: widget.title_BackColor,
iconColor_Active: widget.title_BackColor,
iconColor_Disabled: widget.title_BackColor,
color_backGroundTab: Colors.black,
color_backGroundTab_Activate: Color.fromARGB(255, 75, 75, 75),
));
rebuildAllChildren(context);
// if (xTabs.value.isEmpty) {
// tabController.dispose();
// }
// tabController = TabController(length: xTabs.value.length, vsync: this);
} else {
idx = tabForKey.idx;
}
// tbCtrl!.tabController.index = idx;
editedPage.value = true;
enteredInEditOnCell = false;
});
}