主属性
属性名 | 说明 | 值 |
---|---|---|
appBar | 导航栏 | AppBar对象 |
backgroundColor | 背景颜色 | Color对象 |
body | 内容 | Widget |
bottomNavigationBar | 底部导航栏 | Widget |
bottomSheet | 持久化显示的底部抽屉 | Widget |
drawer | 左侧抽屉 | Widget |
endDrawer | 右侧抽屉 | Widget |
floatingActionButton | 悬浮按钮 | Widget |
persistentFooterButtons | 底部按钮组件 | List |
primary | appBar是否从屏幕顶部布局 | bool对象 |
子属性
AppBar-头部标题栏
属性名 | 说明 | 值 |
---|---|---|
title | 标题 | Widget |
leading | 标题左侧组件 | Widget |
actions | 按钮列表 | List |
backgroundColor | 背景颜色 | Color |
centerTitle | 是否居中 | bool |
BottomNavigationBar-底部导航栏
属性名 | 说明 | 值 |
---|---|---|
items | 标签组(多个值) | List |
onTap | 点击标签的回调 | Func |
BottomNavigationBarType | 设置类型 | fixed-自适应宽度 shifting-位置和尺寸都有单击动画 |
fixedColor | 选中颜色 | Color |
backgroundColor | 背景颜色 | Color |
inconSize | 图标尺寸,默认24 | int |
selectedItemColor | 选中标签颜色 | Color |
unselectedItemColor | 未选中标签颜色 | Color |
selectedIconTheme | 选中注入 | |
unselectedIconTheme | 未选中主题 |
FloatingActionButton-悬浮按钮
属性名 | 说明 | 值 |
---|---|---|
child | 一般为 Icon,不推荐使用文字 | Widget |
tooltip (FAB) | 长按时显示的提示语 | |
backgroundColor | 背景颜色 | Color |
foregroundColor | Icon 与 Text 颜色 | Color |
focusColor | 聚焦色 | Color |
hoverColor | 悬浮色 | Color |
splashColor | 点击时的颜色 | Color |
elevation | 未点击的时候的阴影 | |
hignlightElevation | 点击时阴影值,默认 12.0 | double |
shape | 自定义形状 | |
mini | 默认 false,默认按钮为 56 * 56,当mini 为 true 时, 默认大小为 40 * 40,边框padding 各为 4,所以布局大小为 48 * 48 | |
onPressed | 点击事件回调 | Fun |
mouseCursor | 鼠标悬停,Web可以了解 | Fun |