Почему мой unselectedLabelStyle
мне не подходит? после сохранения моих изменений с атрибутом textStyle в этом unselectedLabelStyle мне ничего не изменится: /
class _NavBarState extends State<NavBar> {
int _selectedPage = 0;
PageController pageController = PageController();
@override
Widget build(BuildContext context) {
return Scaffold(
body: PageView(
controller: pageController,
children: <Widget>[
HomeScreen(),
MapScreen(),
SearchScreen(),
AccountScreen(),
],
),
bottomNavigationBar: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
currentIndex: _selectedPage,
backgroundColor: Colors.white,
selectedIconTheme: IconThemeData(color: Colors.black, size: 32),
// selectedLabelStyle: TextStyle(fontWeight: FontWeight.bold),
unselectedIconTheme: IconThemeData(size: 26, color: Colors.grey.shade300),
unselectedLabelStyle: TextStyle(color: Colors.grey.shade300),//HEEEEEERRRRRRRRREEEEEE
onTap: (int index) {
setState(() {
_selectedPage = index;
});
pageController.animateToPage(
index,
duration: Duration(milliseconds: 500),
curve:
Curves.easeInOutExpo,
);
},
items: [
BottomNavigationBarItem(
icon: Icon(
Icons.home,
),
title: Text('Główna', style: TextStyle(color: Colors.black))),
BottomNavigationBarItem(
icon: Icon(
Icons.location_on,
),
title: Text('Mapa', style: TextStyle(color: Colors.black))),
BottomNavigationBarItem(
icon: Icon(
Icons.search,
),
title: Text('Szukaj', style: TextStyle(color: Colors.black))),
BottomNavigationBarItem(
icon: Icon(
Icons.person,
),
title: Text('Konto', style: TextStyle(color: Colors.black)),
),
],
),
);
}
@override
void dispose() {
pageController.dispose();
super.dispose();
}
}