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>
tuxsudo committed
Aug 22, 2025 at 19:33 UTC
1a4ac1a07c004195a5b6d9f64505b967dc2d2a30
1 file changed
+23
-21
lib/src/screens/base_page.dart
+23
-21
@@ -182,27 +182,29 @@ abstract class BasePage extends StatelessWidget {
182
final backgroundImage = getIt.get<SettingsStore>().backgroundImage;
183
184
return Container(
185
- width: double.infinity,
186
- height: double.infinity,
187
- decoration: BoxDecoration(
188
- image: backgroundImage.isNotEmpty
189
- ? DecorationImage(
190
- image: FileImage(File(backgroundImage)),
191
- fit: BoxFit.cover,
192
- )
193
- : null,
194
- // color: Colors.grey[200],
195
- ),
196
- child: Scaffold(
197
- key: _scaffoldKey,
198
- backgroundColor: pageBackgroundColor(context),
199
- resizeToAvoidBottomInset: resizeToAvoidBottomInset,
200
- extendBodyBehindAppBar: extendBodyBehindAppBar,
201
- endDrawer: endDrawer,
202
- appBar: appBar(context),
203
- body: body(context),
204
- floatingActionButton: floatingActionButton(context)),
205
- );
185
+ width: double.infinity,
186
+ height: double.infinity,
187
+ decoration: BoxDecoration(
188
+ image: backgroundImage.isNotEmpty
189
+ ? DecorationImage(
190
+ image: FileImage(File(backgroundImage)),
191
+ fit: BoxFit.cover,
192
+ )
193
+ : null,
194
+ // color: Colors.grey[200],
195
+ ),
196
+ child: Scaffold(
197
+ key: _scaffoldKey,
198
+ backgroundColor: pageBackgroundColor(context),
199
+ resizeToAvoidBottomInset: resizeToAvoidBottomInset,
200
+ extendBodyBehindAppBar: extendBodyBehindAppBar,
201
+ endDrawer: endDrawer,
202
+ appBar: appBar(context),
203
+ body: SafeArea(
204
+ top: false,
205
+ child: body(context)),
206
+ floatingActionButton: floatingActionButton(context)),
207
+ );
208
}
209
),
210
pushToWidget: (context) => pushToWidget?.call(context),