From c6bf03fe364d99bdae57f47be2052ca58db79d99 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Mon, 22 May 2023 22:57:08 +0530 Subject: [PATCH] Remove bottom padding of bottom navigation bar --- lib/ui/home/home_bottom_nav_bar.dart | 147 +++++++++++++-------------- 1 file changed, 72 insertions(+), 75 deletions(-) diff --git a/lib/ui/home/home_bottom_nav_bar.dart b/lib/ui/home/home_bottom_nav_bar.dart index c2e585b6f..f25fa4fa4 100644 --- a/lib/ui/home/home_bottom_nav_bar.dart +++ b/lib/ui/home/home_bottom_nav_bar.dart @@ -79,85 +79,82 @@ class _HomeBottomNavigationBarState extends State { return RepaintBoundary( child: AnimatedContainer( - duration: const Duration(milliseconds: 3000), + duration: const Duration(milliseconds: 300), curve: Curves.easeInOut, height: filesAreSelected ? 0 : (56 + bottomPadding), child: IgnorePointer( ignoring: filesAreSelected, - child: Padding( - padding: EdgeInsets.only(bottom: bottomPadding), - child: ListView( - physics: const NeverScrollableScrollPhysics(), - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GNav( - curve: Curves.easeOutExpo, - backgroundColor: - getEnteColorScheme(context).backgroundElevated2, - mainAxisAlignment: MainAxisAlignment.center, - iconSize: 24, - padding: const EdgeInsets.fromLTRB(16, 6, 16, 6), - duration: const Duration(milliseconds: 200), - gap: 0, - tabBorderRadius: 32, - tabBackgroundColor: - MediaQuery.of(context).platformBrightness == - Brightness.light - ? strokeFainterLight - : strokeSolidFaintLight, - haptic: false, - tabs: [ - GButton( - margin: const EdgeInsets.fromLTRB(8, 6, 10, 6), - icon: Icons.home_rounded, - iconColor: enteColorScheme.tabIcon, - iconActiveColor: strokeBaseLight, - text: '', - onPressed: () { - _onTabChange( - 0, - mode: "OnPressed", - ); // To take care of occasional missing events - }, - ), - GButton( - margin: const EdgeInsets.fromLTRB(10, 6, 10, 6), - icon: Icons.collections_rounded, - iconColor: enteColorScheme.tabIcon, - iconActiveColor: strokeBaseLight, - text: '', - onPressed: () { - _onTabChange( - 1, - mode: "OnPressed", - ); // To take care of occasional missing - // events - }, - ), - GButton( - margin: const EdgeInsets.fromLTRB(10, 6, 8, 6), - icon: Icons.people_outlined, - iconColor: enteColorScheme.tabIcon, - iconActiveColor: strokeBaseLight, - text: '', - onPressed: () { - _onTabChange( - 2, - mode: "OnPressed", - ); // To take care - // of occasional missing events - }, - ), - ], - selectedIndex: currentTabIndex, - onTabChange: _onTabChange, - ), - ], - ), - ], - ), + child: ListView( + physics: const NeverScrollableScrollPhysics(), + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + GNav( + curve: Curves.easeOutExpo, + backgroundColor: + getEnteColorScheme(context).backgroundElevated2, + mainAxisAlignment: MainAxisAlignment.center, + iconSize: 24, + padding: const EdgeInsets.fromLTRB(16, 6, 16, 6), + duration: const Duration(milliseconds: 200), + gap: 0, + tabBorderRadius: 32, + tabBackgroundColor: + MediaQuery.of(context).platformBrightness == + Brightness.light + ? strokeFainterLight + : strokeSolidFaintLight, + haptic: false, + tabs: [ + GButton( + margin: const EdgeInsets.fromLTRB(8, 6, 10, 6), + icon: Icons.home_rounded, + iconColor: enteColorScheme.tabIcon, + iconActiveColor: strokeBaseLight, + text: '', + onPressed: () { + _onTabChange( + 0, + mode: "OnPressed", + ); // To take care of occasional missing events + }, + ), + GButton( + margin: const EdgeInsets.fromLTRB(10, 6, 10, 6), + icon: Icons.collections_rounded, + iconColor: enteColorScheme.tabIcon, + iconActiveColor: strokeBaseLight, + text: '', + onPressed: () { + _onTabChange( + 1, + mode: "OnPressed", + ); // To take care of occasional missing + // events + }, + ), + GButton( + margin: const EdgeInsets.fromLTRB(10, 6, 8, 6), + icon: Icons.people_outlined, + iconColor: enteColorScheme.tabIcon, + iconActiveColor: strokeBaseLight, + text: '', + onPressed: () { + _onTabChange( + 2, + mode: "OnPressed", + ); // To take care + // of occasional missing events + }, + ), + ], + selectedIndex: currentTabIndex, + onTabChange: _onTabChange, + ), + ], + ), + ], ), ), ),