Flutter Scaffold[组件]

Scaffold

Scaffold是App的页面框架,将整个页面分为如下的几个部分

Scaffold属性

属性 类型 简述
appBar PreferredSizeWidget 界面顶部的一栏控件,相当于 Android 中的 ActionBar
body Widget 当前页面所显示的主要内容
floatingActionButton Widget Material中所定义的FAB,是一个悬浮的功能按钮
floatingActionButtonLocation FloatingActionButtonLocation 设定悬浮按钮的位置
floatingActionButtonAnimator FloatingActionButtonAnimator 悬浮按钮动画
persistentFooterButtons List<Widget> 在底部显示的一组按钮
drawer Widget 开始部分的(左边)抽屉菜单
endDrawer Widget 结束部分的(右边)抽屉菜单
drawerScrimColor Color 打开侧滑菜单时遮盖在主要内容区的蒙层颜色
backgroundColor Color 内容的背景颜色。默认为 ThemeData.scaffoldBackgroundColor
bottomNavigationBar Widget 显示在底部的导航栏
bottomSheet Widget 底部永久性显示的提示框
resizeToAvoidBottomInset bool 页面浮动控件部分自动调整,以避免被弹出键盘所遮盖,默认为true
primary bool 是否填充顶部栏,默认为true
drawerDragStartBehavior DragStartBehavior 处理拖动开始行为的方式
drawerEdgeDragWidth double 水平滑动将要打开侧滑菜单的区域的宽度
extendBody bool 若为true且指定了bottomNavigationBar或者persistentFooterButtonsbody将延伸到Scaffold的底部
extendBodyBehindAppBar bool 作用类似extendBody,但延伸的位置是AppBar
THE END
喜欢就支持一下吧
点赞13赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容