The color of the labels of my selected and unselected BottomNavigationBarItems doesn't change... what am I doing wrong? Here is the code:
bottomNavigationBar: BottomNavigationBar(
selectedLabelStyle: TextStyle(color: Colors.black),
unselectedLabelStyle: TextStyle(color: Colors.black),
backgroundColor: Colors.white,
onTap: onTabTapped,
currentIndex: _currentIndex, // this will be set when a new tab is tapped
items: [
BottomNavigationBarItem(
icon: Icon(Icons.home, color: Colors.black,),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.search, color: Colors.black,),
label: 'Messages',
),
BottomNavigationBarItem(
icon: Icon(Icons.person, color: Colors.black,),
label: 'Profile'
)
],
),
You can use the child property and add the text class in which you can style your text easily