aves/lib/widgets/common/basic/scaffold.dart

42 lines
1.2 KiB
Dart

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,
);
}
}