Scaffold
實(shí)現(xiàn)基本材料設(shè)計(jì)視覺布局結(jié)構(gòu)
構(gòu)造函數(shù)(Constructors)
Scaffold({
Key key,
PreferredSizeWidget appBar,
Widget body,
Widget floatingActionButton,
FloatingActionButtonLocation floatingActionButtonLocation, FloatingActionButtonAnimator floatingActionButtonAnimator,
List<Widget> persistentFooterButtons,
Widget drawer,
Widget endDrawer,
Widget bottomNavigationBar,
Widget bottomSheet,
Color backgroundColor,
bool resizeToAvoidBottomPadding,
bool resizeToAvoidBottomInset,
bool primary: true,
DragStartBehavior drawerDragStartBehavior: DragStartBehavior.start,
bool extendBody: false
})
屬性(Properties)
-
appBar → PreferredSizeWidget
頂部導(dǎo)航欄
-
backgroundColor → Color
背景色
-
body → Widget
Scaffold的主要內(nèi)容
-
bottomNavigationBar → Widget
底部導(dǎo)航欄
-
bottomSheet → Widget
The persistent bottom sheet to display. [...]
-
drawer → Widget
顯示在容器側(cè)面的面板角钩,通常隱藏在移動(dòng)設(shè)備上绍载。從左到右(TextDirection.ltr)或從右到左(TextDirection.rtl)滑入
-
drawerDragStartBehavior → DragStartBehavior
確定處理拖動(dòng)開始行為的方式
-
endDrawer → Widget
顯示在身體側(cè)面的面板锻离,通常隱藏在移動(dòng)設(shè)備上商佑。從右到左(TextDirection.ltr)或從左到右(TextDirection.rtl)滑動(dòng)
-
extendBody → bool
如果為true,并且指定了bottomNavigationBar或persistentFooterButtons鸭蛙,則body將延伸到Scaffold的底部君仆,而不是僅延伸到bottomNavigationBar或persistentFooterButtons的頂部
-
floatingActionButton → Widget
顯示在容器上方的按鈕,位于右下角
-
floatingActionButtonAnimator → FloatingActionButtonAnimator
Animator將floatingActionButton移動(dòng)到新的floatingActionButtonLocation
-
floatingActionButtonLocation → FloatingActionButtonLocation
負(fù)責(zé)確定floatingActionButton的去向
-
persistentFooterButtons → List<Widget>
一組顯示在腳手架底部的按鈕
-
primary → bool
此腳手架是否顯示在屏幕頂部
-
resizeToAvoidBottomInset → bool
如果為true涉馁,則body和scaffold的浮動(dòng)小部件應(yīng)自行調(diào)整大小,以避免屏幕鍵盤的高度由環(huán)境MediaQuery的MediaQueryData.viewInsets底部屬性定義
-
resizeToAvoidBottomPadding → bool
不推薦使用此標(biāo)志爱致,請(qǐng)改用resizeToAvoidBottomInset,
@Deprecated('使用resizeToAvoidBottomInset指定鍵盤出現(xiàn)時(shí)是否應(yīng)調(diào)整主體大小')