Add SafeArea to base page (#2473)

* Add SafeArea to base page

* chore: Move SafeArea to wrap body instead of being at top level

---------

Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
This commit is contained in:
tuxsudo
2025-08-22 22:33:35 +03:00
committed by GitHub
co-authored by Blazebrain
parent 7d67d2ffc7
commit 1a4ac1a07c
+23 -21
View File
@@ -182,27 +182,29 @@ abstract class BasePage extends StatelessWidget {
final backgroundImage = getIt.get<SettingsStore>().backgroundImage;
return Container(
width: double.infinity,
height: double.infinity,
decoration: BoxDecoration(
image: backgroundImage.isNotEmpty
? DecorationImage(
image: FileImage(File(backgroundImage)),
fit: BoxFit.cover,
)
: null,
// color: Colors.grey[200],
),
child: Scaffold(
key: _scaffoldKey,
backgroundColor: pageBackgroundColor(context),
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
extendBodyBehindAppBar: extendBodyBehindAppBar,
endDrawer: endDrawer,
appBar: appBar(context),
body: body(context),
floatingActionButton: floatingActionButton(context)),
);
width: double.infinity,
height: double.infinity,
decoration: BoxDecoration(
image: backgroundImage.isNotEmpty
? DecorationImage(
image: FileImage(File(backgroundImage)),
fit: BoxFit.cover,
)
: null,
// color: Colors.grey[200],
),
child: Scaffold(
key: _scaffoldKey,
backgroundColor: pageBackgroundColor(context),
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
extendBodyBehindAppBar: extendBodyBehindAppBar,
endDrawer: endDrawer,
appBar: appBar(context),
body: SafeArea(
top: false,
child: body(context)),
floatingActionButton: floatingActionButton(context)),
);
}
),
pushToWidget: (context) => pushToWidget?.call(context),