I used go router and StatefulShellRoute, and the bottom NavigationBar icon clicks, but the color does not change
Bottom Navigation Bar manages the index with Provider, and the code of Bottom Navigation Bar is written as below.
I have a total of 5 icons and I just click on the second icon, but the color changes and it doesn't change after that.
@override
Widget build(BuildContext context) {
return Expanded(
child: InkWell(
onTap: onTap,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
isSelected
? CustomGradientIcon(
icon: icon,
gradient: gradient,
fill: 1,
)
: Icon(
icon,
color: FalletterColor.gray700,
fill: 1,
),
const SizedBox(height: 4),
isSelected
? ShaderMask(
shaderCallback: (bounds) =>
gradient.createShader(bounds),
child: Text(
label,
style: FalletterTextStyle.body3.copyWith(
color: Colors.white,
),
),
)
: Text(
label,
style: FalletterTextStyle.body3.copyWith(
color: FalletterColor.gray700,
),
),
],
),
),
);
}