buildTabItem method

Widget buildTabItem(
  1. String title, {
  2. bool isActive = false,
})

Implementation

Widget buildTabItem(String title, {bool isActive = false}) {
  return Column(
    mainAxisSize: MainAxisSize.min,
    children: [
      Text(
        title,
        style: TextStyle(
          fontSize: 20,
          fontWeight: isActive ? FontWeight.w600 : FontWeight.w400,
          color: isActive ? ColorHelper.gradient2 : ColorHelper.grey02,
        ),
      ),
      Container(
        margin: const EdgeInsets.only(top: 4.0),
        height: 2,
        width: isActive
            ? getTextWidth(title, 20, FontWeight.w600)
            : 10, // Set dynamic width based on text
        color: isActive ? ColorHelper.gradient2 : Colors.white,
      ),
    ],
  );
}