增加 BottomNavigationBar 选中文字大小说明

This commit is contained in:
Wang
2019-10-08 23:24:19 +08:00
parent 95c650096e
commit 6bb156650c
2 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,8 @@ class _BottomNavigationBarFullDefault extends State {
currentIndex: _currentIndex, // 当前所高亮的按钮index
onTap: _onItemTapped, // 点击里面的按钮的回调函数,参数为当前点击的按钮 index
fixedColor: Colors.deepPurple, // 如果 type 类型为 fixed则通过 fixedColor 设置选中 item 的颜色
selectedFontSize: 12.0,
unselectedFontSize: 12.0,
items: <BottomNavigationBarItem> [
BottomNavigationBarItem(
title: Text("Home"), icon: Icon(Icons.home)),

View File

@ -25,6 +25,7 @@ const String _text1 =
- 它作为 Scaffold.bottomNavigationBar 参数;
- BottomNavigationBar 3-5个之间个底部按钮数量是合理的理论上 icon 大小合适,可以支持更多;
- 默认0-3个底部按钮数量时BottomNavigationBar采用fixed的模式摆放底部按钮当有4个时默认使用 BottomNavigationBarType.shifting 模式摆放底部按钮;
- 大多数人可能不需要选中文字被放大,可以通过 设置 selectedFontSize 与 unselectedFontSize 同等大小覆盖默认效果;
- 下面的底部导航即是效果;
""";