简体   繁体   English

如何更改bottomnavigationItem的背景颜色?

[英]How to change background color of bottomnavigationItem?

I tried following code but it does not working我尝试了以下代码,但它不起作用

BottomNavigationBarItem(
            icon: SvgPicture.asset("assets/icons/tinpay3.svg"),
            label: "TINPAY",
            backgroundColor: Color.fromRGBO(255, 194, 44, 1.0),
           )

I want to change background color like that.我想像那样改变背景颜色。 在此处输入图片说明 . . SO How to change background color of bottomnavigationItem? SO 如何更改bottomnavigationItem 的背景颜色?

BottomNavigationBar has these color arguments: BottomNavigationBar有这些颜色参数:

fixedColor: ...,
backgroundColor: ...,
selectedItemColor: ...,
unselectedItemColor: ...,

and BottomNavigationBarItem has:BottomNavigationBarItem有:

backgroundColor: ...,

Maybe you should use them?也许你应该使用它们?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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