scaffold function
Widget
scaffold({
- required Widget body,
- Key? key,
- PreferredSizeWidget? appBar,
- Widget? drawer,
- Widget? endDrawer,
- Widget? floatingActionButton,
- EdgeInsets? padding,
- Color? color,
- BoxDecoration? decoration,
- bool resizeToAvoidBottomInset = false,
- bool extendBodyBehindAppBar = false,
- FloatingActionButtonLocation floatingActionButtonLocation = FloatingActionButtonLocation.endFloat,
- BoxConstraints? constraints,
- Alignment? alignment,
Implementation
Widget scaffold({
required final Widget body,
final Key? key,
final PreferredSizeWidget? appBar,
final Widget? drawer,
final Widget? endDrawer,
final Widget? floatingActionButton,
final Widget? bottomNavigationBar,
final EdgeInsets? padding,
final Color? color,
final BoxDecoration? decoration,
final bool resizeToAvoidBottomInset = false,
final bool extendBodyBehindAppBar = false,
final FloatingActionButtonLocation floatingActionButtonLocation = FloatingActionButtonLocation.endFloat,
final BoxConstraints? constraints,
final Alignment? alignment,
}) =>
GestureDetector(
onTap: () => FocusManager.instance.primaryFocus!.unfocus(),
child: Scaffold(
key: key,
backgroundColor: color,
appBar: appBar,
endDrawer: endDrawer,
drawer: drawer,
extendBodyBehindAppBar: extendBodyBehindAppBar,
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
floatingActionButton: floatingActionButton,
floatingActionButtonLocation: floatingActionButtonLocation,
bottomNavigationBar: bottomNavigationBar,
body: Align(
alignment: alignment ?? Alignment.topLeft,
child: Container(constraints: constraints, decoration: decoration, padding: padding, child: body),
),
),
);