wrap navbar in SafeArea and replaced Material with Container

This commit is contained in:
2025-11-22 17:40:00 +01:00
parent b668f6b9ae
commit 28ed22ce73

View File

@@ -31,11 +31,7 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Scaffold(
decoration: BoxDecoration(color: CustomTheme.backgroundColor),
child: SafeArea(
minimum: EdgeInsets.symmetric(vertical: 30),
child: Scaffold(
appBar: AppBar( appBar: AppBar(
centerTitle: true, centerTitle: true,
title: Text( title: Text(
@@ -58,12 +54,14 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
backgroundColor: CustomTheme.backgroundColor, backgroundColor: CustomTheme.backgroundColor,
body: tabs[currentIndex], body: tabs[currentIndex],
extendBody: true, extendBody: true,
bottomNavigationBar: Padding( bottomNavigationBar: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0), padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: Material( child: Container(
elevation: 10, 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(
@@ -106,7 +104,6 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
), ),
), ),
), ),
),
); );
} }