Skip to content

Commit

Permalink
Merge pull request #287 from hypha-dao/bugfix/navbar-overlap-last-item
Browse files Browse the repository at this point in the history
fix: resolve navbar overlapping last item in list
  • Loading branch information
nbetsaif authored Aug 27, 2024
2 parents 0481bbe + 2baa19b commit c8f9794
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions lib/ui/shared/hypha_body_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
},
),
);
}
}

0 comments on commit c8f9794

Please sign in to comment.