这是我使用的小部件代码,它打破了这个障碍:
bottomNavigationbar: BottomNavigationbar( currentIndex: 0,iconSize: 20.0,items: [ BottomNavigationbarItem( Title: Text('Home'),icon: Icon(Icons.accessibility)),BottomNavigationbarItem( Title: Text('Preise'),icon: Icon(Icons.account_Box)),BottomNavigationbarItem( Title: Text('Test'),icon: Icon(Icons.adb)),BottomNavigationbarItem( Title: Text('Mehr'),icon: Icon(Icons.menu)) ])
有没有人知道这里有什么问题?
提前感谢任何提示,
迈克尔
总结When more than 3 BottomNavigationbar items are provIDed the type,if
unspecifIEd,changes toBottomNavigationbarType.shifting
per
07001.
This bit of information should be highlighted in the class’s doc. It’s
easy to overlook where it is (I overlooked it).When the BottomNavigationbar’s type is
BottomNavigationbarType.shifting
the items text and icons are
rendered in white,via DefaultTextStyle and Icontheme. It’s assumed
that theirBottomNavigationbarItem.backgroundcolor
will be specifIEd
as a contrasting color. This is obvIoUsly confusing.The overall IDea with
shifting
type bottom navigation bars is that
each item will have a different background color (that contrasts with
white),since that color will become the color of the entire
navigation bar,when the item is selected.The doc for BottomNavigationbar,and NavigationbarItem needs to be improved.
以上是内存溢出为你收集整理的dart – Flutter BottomNavigationBar不能使用超过三个项目全部内容,希望文章能够帮你解决dart – Flutter BottomNavigationBar不能使用超过三个项目所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)