as shown in the picture blow i have first tab colored with green
tab title is colored put underline is not
is it possible to color the line under the title with the same color green
?
child: TabBar(
onTap: (index) {
setState(() {
selectedIndex = index;
});
},
isScrollable: false,
padding: const EdgeInsets.symmetric(horizontal: 10),
controller: _tabController,
labelColor: getIndicatorAndLabelColor(selectedIndex),
unselectedLabelColor: Colors.black,
indicatorWeight: 4,
indicatorColor: getIndicatorAndLabelColor(selectedIndex),
indicatorPadding:
const EdgeInsets.only(left: 15, right: 15, bottom: 10),
indicator: const ShapeDecoration(
shape: UnderlineInputBorder(
borderSide: BorderSide(
color: myAccentColor,
width: 3,
style: BorderStyle.solid))),
tabs: const [
Tab(
text: 'APPROVED',
),
Tab(
text: 'DENIED',
),
Tab(
text: 'PENDING',
),
],
),
2
Answers
thanks @Yeasin Sheikh , finally i found the solution
You can use
indicatorColor
to set it green.