From 1536e2b2af72bd80a40cd31009ff4431429c0cc6 Mon Sep 17 00:00:00 2001 From: Yannick <69087944+GelbEinhalb@users.noreply.github.com> Date: Fri, 14 Nov 2025 17:31:50 +0100 Subject: [PATCH 1/8] move navbar up --- lib/presentation/views/main_menu/custom_navigation_bar.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/presentation/views/main_menu/custom_navigation_bar.dart b/lib/presentation/views/main_menu/custom_navigation_bar.dart index 20ced7a..3f6a82a 100644 --- a/lib/presentation/views/main_menu/custom_navigation_bar.dart +++ b/lib/presentation/views/main_menu/custom_navigation_bar.dart @@ -55,7 +55,7 @@ class _CustomNavigationBarState extends State body: tabs[currentIndex], extendBody: true, bottomNavigationBar: Padding( - padding: const EdgeInsets.only(left: 12.0, right: 12.0, bottom: 8.0), + padding: const EdgeInsets.only(left: 12.0, right: 12.0, bottom: 18.0), child: Material( elevation: 10, borderRadius: BorderRadius.circular(24), From 36aa4722a329bd051c40c29df0129264c0c9ae19 Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Sat, 15 Nov 2025 17:11:48 +0100 Subject: [PATCH 2/8] wrapped custom_navigation_bar in safearea --- .../main_menu/custom_navigation_bar.dart | 126 +++++++++--------- 1 file changed, 64 insertions(+), 62 deletions(-) diff --git a/lib/presentation/views/main_menu/custom_navigation_bar.dart b/lib/presentation/views/main_menu/custom_navigation_bar.dart index 3f6a82a..28331b8 100644 --- a/lib/presentation/views/main_menu/custom_navigation_bar.dart +++ b/lib/presentation/views/main_menu/custom_navigation_bar.dart @@ -31,71 +31,73 @@ class _CustomNavigationBarState extends State @override Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - centerTitle: true, - title: Text( - _currentTabTitle(), - style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + return SafeArea( + child: Scaffold( + appBar: AppBar( + centerTitle: true, + title: Text( + _currentTabTitle(), + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ), + backgroundColor: CustomTheme.backgroundColor, + scrolledUnderElevation: 0, + actions: [ + IconButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute(builder: (_) => const SettingsView()), + ), + icon: const Icon(Icons.settings), + ), + ], + elevation: 0, ), backgroundColor: CustomTheme.backgroundColor, - scrolledUnderElevation: 0, - actions: [ - IconButton( - onPressed: () => Navigator.push( - context, - MaterialPageRoute(builder: (_) => const SettingsView()), - ), - icon: const Icon(Icons.settings), - ), - ], - elevation: 0, - ), - backgroundColor: CustomTheme.backgroundColor, - body: tabs[currentIndex], - extendBody: true, - bottomNavigationBar: Padding( - padding: const EdgeInsets.only(left: 12.0, right: 12.0, bottom: 18.0), - child: Material( - elevation: 10, - borderRadius: BorderRadius.circular(24), - color: CustomTheme.primaryColor, - child: ClipRRect( + body: tabs[currentIndex], + extendBody: true, + bottomNavigationBar: Padding( + padding: const EdgeInsets.only(left: 12.0, right: 12.0, bottom: 18.0), + child: Material( + elevation: 10, borderRadius: BorderRadius.circular(24), - child: SizedBox( - height: 60, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - NavbarItem( - index: 0, - isSelected: currentIndex == 0, - icon: Icons.home_rounded, - label: 'Home', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 1, - isSelected: currentIndex == 1, - icon: Icons.gamepad_rounded, - label: 'Games', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 2, - isSelected: currentIndex == 2, - icon: Icons.group_rounded, - label: 'Groups', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 3, - isSelected: currentIndex == 3, - icon: Icons.bar_chart_rounded, - label: 'Stats', - onTabTapped: onTabTapped, - ), - ], + color: CustomTheme.primaryColor, + child: ClipRRect( + borderRadius: BorderRadius.circular(24), + child: SizedBox( + height: 60, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + NavbarItem( + index: 0, + isSelected: currentIndex == 0, + icon: Icons.home_rounded, + label: 'Home', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 1, + isSelected: currentIndex == 1, + icon: Icons.gamepad_rounded, + label: 'Games', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 2, + isSelected: currentIndex == 2, + icon: Icons.group_rounded, + label: 'Groups', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 3, + isSelected: currentIndex == 3, + icon: Icons.bar_chart_rounded, + label: 'Stats', + onTabTapped: onTabTapped, + ), + ], + ), ), ), ), From 63d9ed400d1fc61614dee1df4934ebfaf9cddee6 Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Sat, 22 Nov 2025 16:18:37 +0100 Subject: [PATCH 3/8] Adjust padding in CustomNavigationBar - Add vertical minimum padding to SafeArea - Remove bottom padding in bottomNavigationBar - replaced left/right padding in bottomNavigationBar with EdgeInsets.symmetric - removed bottom padding from bottomNavigationBar --- lib/presentation/views/main_menu/custom_navigation_bar.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/presentation/views/main_menu/custom_navigation_bar.dart b/lib/presentation/views/main_menu/custom_navigation_bar.dart index 28331b8..2805689 100644 --- a/lib/presentation/views/main_menu/custom_navigation_bar.dart +++ b/lib/presentation/views/main_menu/custom_navigation_bar.dart @@ -32,6 +32,7 @@ class _CustomNavigationBarState extends State @override Widget build(BuildContext context) { return SafeArea( + minimum: EdgeInsets.symmetric(vertical: 30), child: Scaffold( appBar: AppBar( centerTitle: true, @@ -56,7 +57,7 @@ class _CustomNavigationBarState extends State body: tabs[currentIndex], extendBody: true, bottomNavigationBar: Padding( - padding: const EdgeInsets.only(left: 12.0, right: 12.0, bottom: 18.0), + padding: const EdgeInsets.symmetric(horizontal: 12.0), child: Material( elevation: 10, borderRadius: BorderRadius.circular(24), From b668f6b9ae54375b6e5b59a9f984dd6a63a5d2a0 Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Sat, 22 Nov 2025 16:31:15 +0100 Subject: [PATCH 4/8] fix black top/bottom bar when wrapping scaffold in safearea --- .../main_menu/custom_navigation_bar.dart | 131 +++++++++--------- 1 file changed, 67 insertions(+), 64 deletions(-) diff --git a/lib/presentation/views/main_menu/custom_navigation_bar.dart b/lib/presentation/views/main_menu/custom_navigation_bar.dart index 2805689..709d541 100644 --- a/lib/presentation/views/main_menu/custom_navigation_bar.dart +++ b/lib/presentation/views/main_menu/custom_navigation_bar.dart @@ -31,73 +31,76 @@ class _CustomNavigationBarState extends State @override Widget build(BuildContext context) { - return SafeArea( - minimum: EdgeInsets.symmetric(vertical: 30), - child: Scaffold( - appBar: AppBar( - centerTitle: true, - title: Text( - _currentTabTitle(), - style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + return Container( + decoration: BoxDecoration(color: CustomTheme.backgroundColor), + child: SafeArea( + minimum: EdgeInsets.symmetric(vertical: 30), + child: Scaffold( + appBar: AppBar( + centerTitle: true, + title: Text( + _currentTabTitle(), + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ), + backgroundColor: CustomTheme.backgroundColor, + scrolledUnderElevation: 0, + actions: [ + IconButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute(builder: (_) => const SettingsView()), + ), + icon: const Icon(Icons.settings), + ), + ], + elevation: 0, ), backgroundColor: CustomTheme.backgroundColor, - scrolledUnderElevation: 0, - actions: [ - IconButton( - onPressed: () => Navigator.push( - context, - MaterialPageRoute(builder: (_) => const SettingsView()), - ), - icon: const Icon(Icons.settings), - ), - ], - elevation: 0, - ), - backgroundColor: CustomTheme.backgroundColor, - body: tabs[currentIndex], - extendBody: true, - bottomNavigationBar: Padding( - padding: const EdgeInsets.symmetric(horizontal: 12.0), - child: Material( - elevation: 10, - borderRadius: BorderRadius.circular(24), - color: CustomTheme.primaryColor, - child: ClipRRect( + body: tabs[currentIndex], + extendBody: true, + bottomNavigationBar: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: Material( + elevation: 10, borderRadius: BorderRadius.circular(24), - child: SizedBox( - height: 60, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - NavbarItem( - index: 0, - isSelected: currentIndex == 0, - icon: Icons.home_rounded, - label: 'Home', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 1, - isSelected: currentIndex == 1, - icon: Icons.gamepad_rounded, - label: 'Games', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 2, - isSelected: currentIndex == 2, - icon: Icons.group_rounded, - label: 'Groups', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 3, - isSelected: currentIndex == 3, - icon: Icons.bar_chart_rounded, - label: 'Stats', - onTabTapped: onTabTapped, - ), - ], + color: CustomTheme.primaryColor, + child: ClipRRect( + borderRadius: BorderRadius.circular(24), + child: SizedBox( + height: 60, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + NavbarItem( + index: 0, + isSelected: currentIndex == 0, + icon: Icons.home_rounded, + label: 'Home', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 1, + isSelected: currentIndex == 1, + icon: Icons.gamepad_rounded, + label: 'Games', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 2, + isSelected: currentIndex == 2, + icon: Icons.group_rounded, + label: 'Groups', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 3, + isSelected: currentIndex == 3, + icon: Icons.bar_chart_rounded, + label: 'Stats', + onTabTapped: onTabTapped, + ), + ], + ), ), ), ), From 28ed22ce732bdfe9ee1fabf6c0e9f59c6733df89 Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Sat, 22 Nov 2025 17:40:00 +0100 Subject: [PATCH 5/8] wrap navbar in SafeArea and replaced Material with Container --- .../main_menu/custom_navigation_bar.dart | 129 +++++++++--------- 1 file changed, 63 insertions(+), 66 deletions(-) diff --git a/lib/presentation/views/main_menu/custom_navigation_bar.dart b/lib/presentation/views/main_menu/custom_navigation_bar.dart index 709d541..9727bc0 100644 --- a/lib/presentation/views/main_menu/custom_navigation_bar.dart +++ b/lib/presentation/views/main_menu/custom_navigation_bar.dart @@ -31,76 +31,73 @@ class _CustomNavigationBarState extends State @override Widget build(BuildContext context) { - return Container( - decoration: BoxDecoration(color: CustomTheme.backgroundColor), - child: SafeArea( - minimum: EdgeInsets.symmetric(vertical: 30), - child: Scaffold( - appBar: AppBar( - centerTitle: true, - title: Text( - _currentTabTitle(), - style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + return Scaffold( + appBar: AppBar( + centerTitle: true, + title: Text( + _currentTabTitle(), + style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + ), + backgroundColor: CustomTheme.backgroundColor, + scrolledUnderElevation: 0, + actions: [ + IconButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute(builder: (_) => const SettingsView()), ), - backgroundColor: CustomTheme.backgroundColor, - scrolledUnderElevation: 0, - actions: [ - IconButton( - onPressed: () => Navigator.push( - context, - MaterialPageRoute(builder: (_) => const SettingsView()), - ), - icon: const Icon(Icons.settings), - ), - ], - elevation: 0, + icon: const Icon(Icons.settings), ), - backgroundColor: CustomTheme.backgroundColor, - body: tabs[currentIndex], - extendBody: true, - bottomNavigationBar: Padding( - padding: const EdgeInsets.symmetric(horizontal: 12.0), - child: Material( - elevation: 10, + ], + elevation: 0, + ), + backgroundColor: CustomTheme.backgroundColor, + body: tabs[currentIndex], + extendBody: true, + bottomNavigationBar: SafeArea( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: Container( + decoration: BoxDecoration( borderRadius: BorderRadius.circular(24), color: CustomTheme.primaryColor, - child: ClipRRect( - borderRadius: BorderRadius.circular(24), - child: SizedBox( - height: 60, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - NavbarItem( - index: 0, - isSelected: currentIndex == 0, - icon: Icons.home_rounded, - label: 'Home', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 1, - isSelected: currentIndex == 1, - icon: Icons.gamepad_rounded, - label: 'Games', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 2, - isSelected: currentIndex == 2, - icon: Icons.group_rounded, - label: 'Groups', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 3, - isSelected: currentIndex == 3, - icon: Icons.bar_chart_rounded, - label: 'Stats', - onTabTapped: onTabTapped, - ), - ], - ), + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(24), + child: SizedBox( + height: 60, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + NavbarItem( + index: 0, + isSelected: currentIndex == 0, + icon: Icons.home_rounded, + label: 'Home', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 1, + isSelected: currentIndex == 1, + icon: Icons.gamepad_rounded, + label: 'Games', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 2, + isSelected: currentIndex == 2, + icon: Icons.group_rounded, + label: 'Groups', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 3, + isSelected: currentIndex == 3, + icon: Icons.bar_chart_rounded, + label: 'Stats', + onTabTapped: onTabTapped, + ), + ], ), ), ), From df3215ef761e4264a31ec1441bf2e05ddd6731d6 Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Sat, 22 Nov 2025 17:40:24 +0100 Subject: [PATCH 6/8] Made bottom padding adaptive to screen --- lib/presentation/views/main_menu/groups_view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/presentation/views/main_menu/groups_view.dart b/lib/presentation/views/main_menu/groups_view.dart index c45cf21..5a7a2eb 100644 --- a/lib/presentation/views/main_menu/groups_view.dart +++ b/lib/presentation/views/main_menu/groups_view.dart @@ -103,7 +103,7 @@ class _GroupsViewState extends State { ), Positioned( - bottom: 80, + bottom: MediaQuery.paddingOf(context).bottom + 15, child: CustomWidthButton( text: 'Create Group', sizeRelativeToWidth: 0.90, From 5062196463e0df16477d2901f01db291e377bc30 Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Sat, 22 Nov 2025 17:57:58 +0100 Subject: [PATCH 7/8] Adjust safeareas minimum padding for custom navigation bar --- .../main_menu/custom_navigation_bar.dart | 87 +++++++++---------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/lib/presentation/views/main_menu/custom_navigation_bar.dart b/lib/presentation/views/main_menu/custom_navigation_bar.dart index 9727bc0..7176505 100644 --- a/lib/presentation/views/main_menu/custom_navigation_bar.dart +++ b/lib/presentation/views/main_menu/custom_navigation_bar.dart @@ -55,50 +55,49 @@ class _CustomNavigationBarState extends State body: tabs[currentIndex], extendBody: true, bottomNavigationBar: SafeArea( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 12.0), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(24), - color: CustomTheme.primaryColor, - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(24), - child: SizedBox( - height: 60, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - NavbarItem( - index: 0, - isSelected: currentIndex == 0, - icon: Icons.home_rounded, - label: 'Home', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 1, - isSelected: currentIndex == 1, - icon: Icons.gamepad_rounded, - label: 'Games', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 2, - isSelected: currentIndex == 2, - icon: Icons.group_rounded, - label: 'Groups', - onTabTapped: onTabTapped, - ), - NavbarItem( - index: 3, - isSelected: currentIndex == 3, - icon: Icons.bar_chart_rounded, - label: 'Stats', - onTabTapped: onTabTapped, - ), - ], - ), + minimum: const EdgeInsets.only(bottom: 30), + child: Container( + margin: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(24), + color: CustomTheme.primaryColor, + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(24), + child: SizedBox( + height: 60, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + NavbarItem( + index: 0, + isSelected: currentIndex == 0, + icon: Icons.home_rounded, + label: 'Home', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 1, + isSelected: currentIndex == 1, + icon: Icons.gamepad_rounded, + label: 'Games', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 2, + isSelected: currentIndex == 2, + icon: Icons.group_rounded, + label: 'Groups', + onTabTapped: onTabTapped, + ), + NavbarItem( + index: 3, + isSelected: currentIndex == 3, + icon: Icons.bar_chart_rounded, + label: 'Stats', + onTabTapped: onTabTapped, + ), + ], ), ), ), From fd13fe6e903bc61d4843200385203bdbe9210da4 Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Sat, 22 Nov 2025 17:58:33 +0100 Subject: [PATCH 8/8] made CustomWidthButton's position adaptive to bottom padding of safearea --- lib/presentation/views/main_menu/groups_view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/presentation/views/main_menu/groups_view.dart b/lib/presentation/views/main_menu/groups_view.dart index 5a7a2eb..4bf9cba 100644 --- a/lib/presentation/views/main_menu/groups_view.dart +++ b/lib/presentation/views/main_menu/groups_view.dart @@ -103,7 +103,7 @@ class _GroupsViewState extends State { ), Positioned( - bottom: MediaQuery.paddingOf(context).bottom + 15, + bottom: MediaQuery.paddingOf(context).bottom, child: CustomWidthButton( text: 'Create Group', sizeRelativeToWidth: 0.90,