一、原因
之前一直使用(Flutter SDK 1.2.1稳定版),遇到一个很不爽的问题——BottomNavigationBarItem 选中时 title中的文字会放大。有什么设置可以去掉这个放大呢? 国内的APP中很少有navigation item 有动画的!!!
即搜索比首页的字号大,而且切换的时候是有动画的。
二、解决
在BottomNavigationBar的api中根本没有找到对应的设置,于是乎重写了一个Widget,代码如下,仅供参考!
int _currentIndex = 0;
Widget _buildBottomNavigationBar(){
return Container(
color: Colors.white,
child: SafeArea(
child: SizedBox(
height: 54.0,
child: Card(
elevation: 0.0,
shape: RoundedRectangleBorder(),
margin: EdgeInsets.all(0.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget