2 Commits

Author SHA1 Message Date
df3215ef76 Made bottom padding adaptive to screen
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m8s
Pull Request Pipeline / lint (pull_request) Successful in 2m8s
2025-11-22 17:40:24 +01:00
28ed22ce73 wrap navbar in SafeArea and replaced Material with Container 2025-11-22 17:40:00 +01:00
2 changed files with 64 additions and 67 deletions

View File

@@ -31,76 +31,73 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
@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: <Widget>[
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: <Widget>[
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,
),
],
),
),
),

View File

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