打算flutter仿个掘金玩玩, 这不刚开始,就碰到问题了.git
正常的底部按钮是这样的github
bottomNavigationBar: new BottomNavigationBar(
items: [
new BottomNavigationBarItem(
icon: Icon(Icons.home),
title: new Text("123"),
),
new BottomNavigationBarItem(
icon: Icon(Icons.whatshot),
title: new Text("123"),
),
new BottomNavigationBarItem(
icon: Icon(Icons.search),
title: new Text("123"),
),
new BottomNavigationBarItem(
icon: Icon(Icons.book),
title: new Text("123"),
),
new BottomNavigationBarItem(
icon: Icon(Icons.person),
title: new Text("123"),
),
],
复制代码
掘金呢.是没有文字的.bash
因而我就想固然的把title
去掉.spa
而后.code
好吧,title不能为nullcdn
这里根本没有声明是必传的好吗?blog
而后看get
这里又作校验了..真是.string
new BottomNavigationBarItem(
icon: Icon(Icons.person),
title: new Text(''),
),
复制代码
不行,没居中.it
new BottomNavigationBarItem(
icon: Icon(Icons.person),
title: new Container(),
),
复制代码
可是,强迫症写起来总以为怪怪的.这个title不须要为啥必定要设置
去github上看flutter 的issuse.#17099
好像没有改的打算.
这个东西嘛,本身去重写一个感受也不必,真是..
Flutter:782978118
Android:493180098