一、Flutter BottomNavigationBar 组件

BottomNavigationBar 是底部导航条,可以让我们定义底部 Tab 切换,bottomNavigationBar是 Scaffold 组件的参数。
 
 

BottomNavigationBar 常见的属性

属性名 说明
items List<BottomNavigationBarItem> 底部导航条按钮集合
iconSize icon
currentIndex 默认选中第几个
onTap 选中变化回调函数
fixedColor 选中的颜色
type

BottomNavigationBarType.fixed

BottomNavigationBarType.shifting

  Scaffold(
appBar: AppBar(
title: Text('Flutter Demo')
),
body: this._pagesList[this._curentIndex],
bottomNavigationBar: BottomNavigationBar(
currentIndex: _curentIndex,
onTap: _changePage,
fixedColor: Colors.black,
type: BottomNavigationBarType.fixed,
items: [
BottomNavigationBarItem(
title:Text("首页"),
icon:Icon(Icons.home)
),
BottomNavigationBarItem(
title:Text("分类"),
icon:Icon(Icons.category)
),
BottomNavigationBarItem(
title:Text("设置"),
icon:Icon(Icons.settings)
),
], ),
)

最新文章

  1. PlayMaker的应用
  2. 分表的一个记录---Ruby
  3. FZU 2129 子序列个数 (递推dp)
  4. Codeforces Gym 100637A A. Nano alarm-clocks 前缀和
  5. MinGW-notepad++开发c/c++程序
  6. Visual Studio 内置快速生产代码简写集合
  7. BZOJ 3563 DZY Loves Chinese
  8. Coco2d-x android win7 Python 游戏开发环境的搭建
  9. 数据库 MYSQL操作(一)
  10. 字符串匹配KMP算法的讲解C++
  11. linux环境中通过/dev/urandom设备产生随机密码
  12. 函数(一.return)
  13. ArcSDE账户频繁被锁定(Oracle显示12560协议适配器错误)
  14. Cglib源码分析 invoke和invokeSuper的差别(转)
  15. linux下tar gz bz2 tgz z等众多压缩文件的压缩与解压方法
  16. Monitoring an IBM JVM with VisualVM
  17. Npoi导出excel整理(附源码)
  18. Win7 系统还原
  19. bzoj 2055: 80人环游世界 -- 上下界网络流
  20. 【spring cloud】spring cloud 使用feign调用,1.fallback熔断器不起作用,2.启动报错Caused by: java.lang.ClassNotFoundException: com.netflix.hystrix.contrib.javanica.aop.aspectj.Hystri解决

热门文章

  1. java double/float转BigDecimal,精度问题
  2. dns服务之bind配置内网解析部分子域名,其它子域名转发
  3. 新发现的几个不错的c++库
  4. 使用JIMO ActionOne HongHu 及其他MR VR眼镜,将真实场景和游戏内场景混合渲染
  5. &lt;input&gt;输入框,限制输入的为正整数
  6. vue-表格拖拽
  7. pyqt5中文教程
  8. 问题:为啥explain 后type=all
  9. Delphi获取程序版本号
  10. uni-app配置钉钉小程序步骤