When clicking on the image they change color, it just doesn't change if you drag with your finger, could someone help me with the icons change color when the user also wants to drag with the finger, this below is the code.
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(
context),
sliver: SliverAppBar(
pinned: true,
floating: true,
automaticallyImplyLeading: false,
forceElevated: innerBoxIsScrolled,
bottom: TabBar(
onTap: (value) {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
setState(() {
index=value;
});
});
},
tabs: [
Tab(
icon: SizedBox(
height: 25,
child: Image.asset(
AppImages.fix,
color:
index == 0 ? Colors.white : Colors.blue,
),
),
),
Tab(
icon: SizedBox(
height: 25,
child: Image.asset(
AppImages.home,
color:
index == 1 ? Colors.white : Colors.blue,
),
),
),
],
),
),
),
