fix bottom nav bar ui

merge-update-with-lab-changes
hussam al-habibeh 5 years ago
parent cfe9e35c38
commit 7427cd68ff

@ -44,17 +44,17 @@ class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
title: TranslationBase.of(context).Alhabibapp, title: TranslationBase.of(context).Alhabibapp,
), ),
Container( // Container(
height: 65.0, // height: 65.0,
child: Center( // child: Center(
child: VerticalDivider( // child: VerticalDivider(
color: Colors.grey, // color: Colors.grey,
thickness: 0.5, // thickness: 0.5,
width: 0.3, // width: 0.3,
indent: 25.5, // indent: 25.5,
), // ),
), // ),
), // ),
BottomNavPharmacyItem( BottomNavPharmacyItem(
icon: EvaIcons.list, icon: EvaIcons.list,
@ -79,12 +79,13 @@ class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
// Added Calendar Icon to access book appointment flow // Added Calendar Icon to access book appointment flow
BottomNavPharmacyItem( BottomNavPharmacyItem(
icon: EvaIcons.heart, icon: EvaIcons.home,
activeIcon: EvaIcons.heart, activeIcon: EvaIcons.home,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: widget.index, index: widget.index,
currentIndex: 2, currentIndex: 0,
title: TranslationBase.of(context).wishList), isHome: true,
title: TranslationBase.of(context).home),
BottomNavPharmacyItem( BottomNavPharmacyItem(
icon: EvaIcons.person, icon: EvaIcons.person,
@ -95,8 +96,8 @@ class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
title: TranslationBase.of(context).myAccount, title: TranslationBase.of(context).myAccount,
), ),
BottomNavPharmacyItem( BottomNavPharmacyItem(
icon: EvaIcons.shoppingCart, icon: EvaIcons.shoppingCartOutline,
activeIcon: EvaIcons.shoppingCart, activeIcon: EvaIcons.shoppingCartOutline,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: widget.index, index: widget.index,
currentIndex: 4, currentIndex: 4,

@ -59,16 +59,16 @@ class BottomNavHomeItem extends StatelessWidget {
Container( Container(
child: Image.asset( child: Image.asset(
'assets/images/habib-logo.png', 'assets/images/habib-logo.png',
height: 35.0,
), ),
height: 22.0,
), ),
SizedBox( SizedBox(
height: 11, height: 9,
), ),
Texts( Texts(
title, title,
textAlign: TextAlign.center, textAlign: TextAlign.start,
color: currentIndex == index ? secondaryColor : Colors.grey, color: currentIndex == index ? Colors.grey : Colors.grey,
fontSize: 11, fontSize: 11,
), ),
// Added TextAlign Property // Added TextAlign Property

@ -10,6 +10,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
final int index; final int index;
final int currentIndex; final int currentIndex;
final Function onTap; final Function onTap;
final bool isHome;
final IconData activeIcon; final IconData activeIcon;
BottomNavPharmacyItem( BottomNavPharmacyItem(
@ -19,7 +20,8 @@ class BottomNavPharmacyItem extends StatelessWidget {
this.currentIndex, this.currentIndex,
this.activeIcon, this.activeIcon,
this.title, this.title,
this.onTap}); this.onTap,
this.isHome = false});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -49,8 +51,11 @@ class BottomNavPharmacyItem extends StatelessWidget {
), ),
Container( Container(
child: Icon(currentIndex == index ? activeIcon : icon, child: Icon(currentIndex == index ? activeIcon : icon,
color: color: isHome
currentIndex == index ? secondaryColor : Colors.grey, ? Color(0xff5AB145)
: currentIndex == index
? Colors.grey
: Colors.grey,
size: 22.0), size: 22.0),
), ),
SizedBox( SizedBox(
@ -61,8 +66,10 @@ class BottomNavPharmacyItem extends StatelessWidget {
Texts( Texts(
title, title,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: currentIndex == index ? secondaryColor : Colors.grey, color: currentIndex == index ? Colors.grey : Colors.grey,
fontSize: 11, fontWeight:
currentIndex == index ? FontWeight.bold : FontWeight.w400,
fontSize: currentIndex == index ? 13 : 11,
), ),
], ],
), ),

Loading…
Cancel
Save