diff options
Diffstat (limited to 'lib/widgets/common/basic/scaffold.dart')
| -rw-r--r-- | lib/widgets/common/basic/scaffold.dart | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/widgets/common/basic/scaffold.dart b/lib/widgets/common/basic/scaffold.dart new file mode 100644 index 0000000..81058a6 --- /dev/null +++ b/lib/widgets/common/basic/scaffold.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; + +class AvesScaffold extends StatelessWidget { + final PreferredSizeWidget? appBar; + final Widget? body; + final Widget? floatingActionButton; + final Widget? drawer; + final Widget? bottomNavigationBar; + final Color? backgroundColor; + final bool? resizeToAvoidBottomInset; + final bool extendBody; + + const AvesScaffold({ + super.key, + this.appBar, + this.body, + this.floatingActionButton, + this.drawer, + this.bottomNavigationBar, + this.backgroundColor, + this.resizeToAvoidBottomInset, + this.extendBody = false, + }); + + @override + Widget build(BuildContext context) { + // prevent conflict between drawer drag gesture and Android navigation gestures + final drawerEnableOpenDragGesture = MediaQuery.systemGestureInsetsOf(context).horizontal == 0; + + return Scaffold( + appBar: appBar, + body: body, + floatingActionButton: floatingActionButton, + drawer: drawer, + bottomNavigationBar: bottomNavigationBar, + backgroundColor: backgroundColor, + resizeToAvoidBottomInset: resizeToAvoidBottomInset, + extendBody: extendBody, + drawerEnableOpenDragGesture: drawerEnableOpenDragGesture, + ); + } +} |
