2 Commits

Author SHA1 Message Date
fd13fe6e90 made CustomWidthButton's position adaptive to bottom padding of safearea
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m6s
Pull Request Pipeline / lint (pull_request) Successful in 2m6s
2025-11-22 17:58:33 +01:00
5062196463 Adjust safeareas minimum padding for custom navigation bar 2025-11-22 17:57:58 +01:00
2 changed files with 44 additions and 45 deletions

View File

@@ -55,50 +55,49 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
body: tabs[currentIndex], body: tabs[currentIndex],
extendBody: true, extendBody: true,
bottomNavigationBar: SafeArea( bottomNavigationBar: SafeArea(
child: Padding( minimum: const EdgeInsets.only(bottom: 30),
padding: const EdgeInsets.symmetric(horizontal: 12.0), child: Container(
child: Container( margin: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(24), borderRadius: BorderRadius.circular(24),
color: CustomTheme.primaryColor, color: CustomTheme.primaryColor,
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(24), borderRadius: BorderRadius.circular(24),
child: SizedBox( child: SizedBox(
height: 60, height: 60,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
NavbarItem( NavbarItem(
index: 0, index: 0,
isSelected: currentIndex == 0, isSelected: currentIndex == 0,
icon: Icons.home_rounded, icon: Icons.home_rounded,
label: 'Home', label: 'Home',
onTabTapped: onTabTapped, onTabTapped: onTabTapped,
), ),
NavbarItem( NavbarItem(
index: 1, index: 1,
isSelected: currentIndex == 1, isSelected: currentIndex == 1,
icon: Icons.gamepad_rounded, icon: Icons.gamepad_rounded,
label: 'Games', label: 'Games',
onTabTapped: onTabTapped, onTabTapped: onTabTapped,
), ),
NavbarItem( NavbarItem(
index: 2, index: 2,
isSelected: currentIndex == 2, isSelected: currentIndex == 2,
icon: Icons.group_rounded, icon: Icons.group_rounded,
label: 'Groups', label: 'Groups',
onTabTapped: onTabTapped, onTabTapped: onTabTapped,
), ),
NavbarItem( NavbarItem(
index: 3, index: 3,
isSelected: currentIndex == 3, isSelected: currentIndex == 3,
icon: Icons.bar_chart_rounded, icon: Icons.bar_chart_rounded,
label: 'Stats', label: 'Stats',
onTabTapped: onTabTapped, onTabTapped: onTabTapped,
), ),
], ],
),
), ),
), ),
), ),

View File

@@ -103,7 +103,7 @@ class _GroupsViewState extends State<GroupsView> {
), ),
Positioned( Positioned(
bottom: MediaQuery.paddingOf(context).bottom + 15, bottom: MediaQuery.paddingOf(context).bottom,
child: CustomWidthButton( child: CustomWidthButton(
text: 'Create Group', text: 'Create Group',
sizeRelativeToWidth: 0.90, sizeRelativeToWidth: 0.90,