Scafflod的常用Widget进行介绍。
appBar: AppBar(
title: Text('title'),
),
-
body : app的全体画面
-
floatingActionButton : 右下角的按钮
floatingActionButton: FloatingActionButton(
onPressed: (){},
child: const Icon(Icons.add),
),
backgroundColor: Colors.red,
drawer:const Drawer(),
-
endDrawer : app的右上角配置一个抽屉UI
endDrawer: const Drawer(),
-
floatingActionButtonLocation : 自定义floatingActionButton的配置位置
floatingActionButtonLocation:FloatingActionButtonLocation.centerTop,
-
resizeToAvoidBottomInset : 防止body的内容被keyboard键盘给遮挡住
resizeToAvoidBottomInset: true,