|
| 1 | +## **Scallold** |
| 2 | +> |
| 3 | +页面的基础布局结构控件, |
| 4 | + |
| 5 | +### 构造方法 |
| 6 | +``` dart |
| 7 | +Scaffold({ |
| 8 | +Key key, |
| 9 | +PreferredSizeWidget appBar, |
| 10 | +Widget body, |
| 11 | +Widget floatingActionButton, |
| 12 | +FloatingActionButtonLocation floatingActionButtonLocation, |
| 13 | +FloatingActionButtonAnimator floatingActionButtonAnimator, |
| 14 | +List<Widget> persistentFooterButtons, |
| 15 | +Widget drawer, |
| 16 | +Widget endDrawer, |
| 17 | +Widget bottomNavigationBar, |
| 18 | +Widget bottomSheet, |
| 19 | +Color backgroundColor, |
| 20 | +bool resizeToAvoidBottomPadding, |
| 21 | +bool resizeToAvoidBottomInset, |
| 22 | +bool primary: true, |
| 23 | +DragStartBehavior drawerDragStartBehavior: DragStartBehavior.down }) |
| 24 | +``` |
| 25 | + |
| 26 | +### 属性介绍 |
| 27 | +* appBar: 头部导航条 |
| 28 | +* backgroundColor: 页面背景颜色 |
| 29 | +* body : 整个scaffold主要显示模块内容 |
| 30 | +* bottomNavigationBar:页面地方导航条 |
| 31 | +* bottomSheet: 持久可见的底部sheet,即使用户在和其他页面部分有交互,底部sheet依然是可见的。 |
| 32 | +可以使用showBottomSheet函数创建和显示模态底部sheet。如果用ShowBottomSheet这个函数 |
| 33 | +创建了bottomSheet,那么在build一个含有bottomSheet的新的Scaffold的时候,当前的bottomSheet必须关闭。bottomSheet可以是任何形式的widget |
| 34 | +* drawer :页面的抽屉,有从左向右或者从右向左的显示效果 |
0 commit comments