简体   繁体   English

如何更改 BottomNavigationBarItem Flutter 标签中的 Fontfamily?

[英]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
        ),

], ],

enter image description here在此处输入图像描述

I think this will work:我认为这会起作用:

BottomNavigationBar has properties like BottomNavigationBar具有如下属性

TextStyle? selectedLabelStyle TextStyle? selectedLabelStyle and TextStyle? unselectedLabelStyle TextStyle? selectedLabelStyleTextStyle? 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM