From 2baa19b1f16b5d478e61e785fd1e0ea798dd5efb Mon Sep 17 00:00:00 2001 From: Saif Nbet Date: Sat, 24 Aug 2024 15:37:43 +0100 Subject: [PATCH] fix: resolve navbar overlapping last item in list --- lib/ui/shared/hypha_body_widget.dart | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/ui/shared/hypha_body_widget.dart b/lib/ui/shared/hypha_body_widget.dart index 89e68831..53e4d420 100644 --- a/lib/ui/shared/hypha_body_widget.dart +++ b/lib/ui/shared/hypha_body_widget.dart @@ -27,19 +27,21 @@ class HyphaBodyWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return Builder( - builder: (context) { - switch (pageState) { - case PageState.initial: - return initial?.call(context) ?? const SizedBox.shrink(); - case PageState.loading: - return loading?.call(context) ?? const Center(child: CircularProgressIndicator.adaptive()); - case PageState.failure: - return failure?.call(context) ?? const HyphaErrorWidget(); - case PageState.success: - return GestureDetector(onTap: () => FocusScope.of(context).unfocus(), child: success(context)); - } - }, + return SafeArea( + child: Builder( + builder: (context) { + switch (pageState) { + case PageState.initial: + return initial?.call(context) ?? const SizedBox.shrink(); + case PageState.loading: + return loading?.call(context) ?? const Center(child: CircularProgressIndicator.adaptive()); + case PageState.failure: + return failure?.call(context) ?? const HyphaErrorWidget(); + case PageState.success: + return GestureDetector(onTap: () => FocusScope.of(context).unfocus(), child: success(context)); + } + }, + ), ); } }