My code like this :
TabBar(
controller: _tabController,
isScrollable: false,
dividerColor: Colors.transparent,
indicator: const UnderlineTabIndicator(
borderSide: BorderSide(color: Colors.green, width: 4.0),
borderRadius: BorderRadius.all(Radius.circular(25)),
insets: EdgeInsets.symmetric(horizontal: 70.0, vertical: 17),
),
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Colors.black,
unselectedLabelColor: Colors.grey,
tabs: [
Tab(child: _buildTab(text: 'Phone', isSelected: _selectedIndex == 0)),
Tab(child: _buildTab(text: 'Email', isSelected: _selectedIndex == 1)),
],
),
and for _buildTab widget like this :
Widget _buildTab({required String text, required bool isSelected}) {
return Container(
alignment: Alignment.center,
width: double.infinity,
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(25),
topRight: Radius.circular(25),
),
),
child: Text(
text,
style: TextStyle(
fontSize: 18,
color: isSelected ? Colors.black : Colors.black,
),
),
);
}
how to create TabBar like radius in middle tab-bar, honestly i'm stuck for custom this one. please help