appbar属性
属性 |
释义 |
leading |
导航按钮显示的图标 |
title |
标题 |
actions |
相当于menu |
bottom |
通常用来放置tabBar |
backgroundColor |
导航背景颜色 |
iconTheme |
图表样式 |
textTheme |
文字样式 |
centerTitle |
标题是否居中显示 |
自定义AppBar使用
TabBar(TabLayout)
属性
属性 |
释义 |
tabs |
显示标签内容 |
controller |
TabController对象 |
isScrollable |
是否可滚动,即是否在一个屏幕放下所有Tab |
indicatorColor |
指示器颜色 |
indicatorWeight |
指示器高度 |
indicatorPadding |
底部指示器的padding |
indicator |
指示器decoration |
indicatorSize |
指示器大小计算方式,TabBarIndicatorSize.label 跟文字等宽,TabBarIndicatorSize.tab 跟每个tab等宽 |
labelColor |
选中label颜色 |
labelStyle |
选中label的style |
labelPadding |
每个label的padding值 |
unselectedLabelColor |
未选中 label 颜色 |
unselectedLabelStyle |
未选中label的style |
存在Bottomnavigation的页面创建TabLayout
通过TabController实现TabLayout
- 以上示例均在前篇路由配置基础上进行配置