[英]how to change Fontfamily in BottomNavigationBarItem Flutter label?
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home', // this i want to change font family
),
], ],
I think this will work:我认为这会起作用:
BottomNavigationBar
has properties like BottomNavigationBar
具有如下属性
TextStyle? selectedLabelStyle
TextStyle? selectedLabelStyle
and TextStyle? unselectedLabelStyle
TextStyle? selectedLabelStyle
和TextStyle? unselectedLabelStyle
TextStyle? unselectedLabelStyle
Using these properties, you can assign TextStyle to your label text and change the fontStyle/font family of the BottomNavigationBar
item.使用这些属性,您可以将 TextStyle 分配给标签文本并更改
BottomNavigationBar
项的字体样式/字体系列。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.