我选择和未选择的 BottomNavigationBarItems 标签的颜色没有改变......我做错了什么?这是代码:
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'
)
],
),