itemWidget method

Column itemWidget()

Implementation

Column itemWidget() {
  return Column(
    mainAxisAlignment: MainAxisAlignment.center,
    crossAxisAlignment: CrossAxisAlignment.center,
    children: [
      Image.asset(
        item.icon,
        width: tabBar.iconSize,
        height: tabBar.iconSize,
        color: currentIndex == tabIndex
            ? tabBar.tabSelectedColor
            : tabBar.tabUnSelectedColor,
      ),
      tabBar.tabIndicatorStyle == TabIndicatorStyle.dot
          ? Align(
              alignment: Alignment.topCenter,
              child: Container(
                margin: const EdgeInsets.only(top: 2),
                height: tabBar.tabIndicatorHeight,
                decoration: BoxDecoration(
                    color: currentIndex == tabIndex
                        ? tabBar.tabSelectedColor
                        : Colors.white,
                    borderRadius:
                        BorderRadius.circular(tabBar.tabBorderRadius)),
                width: tabBar.tabIndicatorHeight,
              ),
            )
          : tabBar.tabBarStyle == NavigationTabBarStyle.icon
              ? const SizedBox()
              : Text(
                  item.title!,
                  textAlign: TextAlign.center,
                  style: TextStyle(
                      fontSize: tabBar.fontSize,
                      color: currentIndex == tabIndex
                          ? tabBar.tabSelectedColor
                          : tabBar.tabUnSelectedColor),
                )
    ],
  );
}