From 067313e0775388fe99fc6d439e47fd7a15c853c6 Mon Sep 17 00:00:00 2001 From: David Adegoke <64401859+Blazebrain@users.noreply.github.com> Date: Fri, 5 Sep 2025 13:03:04 +0100 Subject: [PATCH] fix: Handle black space and nav bar issue (#2499) --- lib/src/screens/base_page.dart | 37 +++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/lib/src/screens/base_page.dart b/lib/src/screens/base_page.dart index 63925cb09..149598d62 100644 --- a/lib/src/screens/base_page.dart +++ b/lib/src/screens/base_page.dart @@ -182,18 +182,18 @@ abstract class BasePage extends StatelessWidget { final backgroundImage = getIt.get().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( + 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, @@ -201,11 +201,16 @@ abstract class BasePage extends StatelessWidget { endDrawer: endDrawer, appBar: appBar(context), body: SafeArea( + left: false, + right: false, top: false, - child: body(context)), - floatingActionButton: floatingActionButton(context)), - ); - } + bottom: Platform.isAndroid, + child: body(context), + ), + floatingActionButton: floatingActionButton(context), + ), + ); + }, ), pushToWidget: (context) => pushToWidget?.call(context), pushToNextWidget: (context) => pushToNextWidget?.call(context),