I want to add this divider inside my TabBar
:
I tried adding a simple Container
between the two tabs but they shift left and right so they don’t look in the center. Here is my code so far:
Container(
height: 38,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: AppColors.borderColor),
top: BorderSide(color: AppColors.borderColor),
),
),
padding: const EdgeInsets.symmetric(vertical: 7),
child: TabBar(
indicatorColor: Colors.transparent,
labelColor: AppColors.primaryColor,
unselectedLabelColor: Colors.black,
dividerColor: Colors.black,
tabs: [
Tab(
child: Text(
'Products',
style: kButtonsStyle.copyWith(
fontWeight: FontWeight.w400,
),
),
),
Tab(
child: Text(
'Suppliers',
style: kButtonsStyle.copyWith(
fontWeight: FontWeight.w400,
),
),
)
],
),
),
2
Answers
try to add this code between two TabBars.