I am using a navigation bar with two buttons for both of them I have set the color as white but for one of them, the button is not changing and appears to be the same color as the navigation bar.
The icons.newspaper widget is causing the issue.
The buttons are working perfectly only problem is with color
My navigation bar widget :
class _bottomNavigationBarState extends State<bottomNavigationBar> {
final navigationKey = GlobalKey<CurvedNavigationBarState>();
int indexNavbar = 0;
final screens = [OverViewScreen(), PageViewBuilder()];
@override
Widget build(BuildContext context) {
return
SafeArea(
top: false,
child: ClipRRect(
child: Scaffold(
extendBody: true,
bottomNavigationBar: Theme(
data: Theme.of(context)
.copyWith(iconTheme: IconThemeData(color: Colors.white)),
child: CurvedNavigationBar(
color: Color.fromARGB(255, 55, 126, 185),
buttonBackgroundColor: Color.fromARGB(255, 55, 126, 185),
animationCurve: Curves.easeInOut,
animationDuration: Duration(milliseconds: 300),
key: navigationKey,
onTap: (index) => setState(() => this.indexNavbar =
index),
index: indexNavbar,
height: 60,
items: [
Icon(
Icons.newspaper,
size: 30,
color: Colors.white,
),
Icon(
Icons.video_library,
size: 30,
color: Colors.white,
)
],
backgroundColor: Colors.transparent,
),
),
body: screens[indexNavbar],
),
),
);
}
}
What I have tried:
I tried wrapping it with the theme widget but that is not doing the trick. I also gave it color separately