|
|
@ -50,7 +50,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
|
|
|
|
splashColor: Colors.transparent,
|
|
|
|
splashColor: Colors.transparent,
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
if (!Provider.of<ProjectViewModel>(context, listen: false)
|
|
|
|
if (!Provider.of<ProjectViewModel>(context, listen: false)
|
|
|
|
.isLogin &&
|
|
|
|
.isLogin &&
|
|
|
|
(currentIndex == 2 || currentIndex == 3))
|
|
|
|
(currentIndex == 2 || currentIndex == 3))
|
|
|
|
Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
@ -68,19 +68,19 @@ class BottomNavPharmacyItem extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
currentIndex == index
|
|
|
|
currentIndex == index
|
|
|
|
? Divider(
|
|
|
|
? Divider(
|
|
|
|
color: Color(0xff5AB145),
|
|
|
|
color: Color(0xff5AB145),
|
|
|
|
thickness: 3.5,
|
|
|
|
thickness: 3.5,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: Divider(
|
|
|
|
: Divider(
|
|
|
|
thickness: 0,
|
|
|
|
thickness: 0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Icon(currentIndex == index ? activeIcon : icon,
|
|
|
|
child: Icon(currentIndex == index ? activeIcon : icon,
|
|
|
|
color: isHome
|
|
|
|
color: isHome
|
|
|
|
? Color(0xff5AB145)
|
|
|
|
? Color(0xff5AB145)
|
|
|
|
: currentIndex == index
|
|
|
|
: currentIndex == index
|
|
|
|
? Colors.grey
|
|
|
|
? Colors.grey
|
|
|
|
: Colors.grey,
|
|
|
|
: Colors.grey,
|
|
|
|
size: 22.0),
|
|
|
|
size: 22.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
@ -92,26 +92,37 @@ class BottomNavPharmacyItem extends StatelessWidget {
|
|
|
|
title,
|
|
|
|
title,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
color: currentIndex == index ? Colors.grey : Colors.grey,
|
|
|
|
color: currentIndex == index ? Colors.grey : Colors.grey,
|
|
|
|
fontWeight:
|
|
|
|
fontWeight: currentIndex == index
|
|
|
|
currentIndex == index ? FontWeight.bold : FontWeight.w400,
|
|
|
|
? FontWeight.bold
|
|
|
|
|
|
|
|
: FontWeight.w400,
|
|
|
|
fontSize: currentIndex == index ? 13 : 11,
|
|
|
|
fontSize: currentIndex == index ? 13 : 11,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if(projectViewModel.isLogin && currentIndex == 3 && orderPreviewViewModel.cartResponse.quantityCount !=0)
|
|
|
|
if (currentIndex == 3 &&
|
|
|
|
|
|
|
|
Provider.of<OrderPreviewViewModel>(context, listen: false)
|
|
|
|
|
|
|
|
.cartResponse
|
|
|
|
|
|
|
|
.quantityCount !=
|
|
|
|
|
|
|
|
0)
|
|
|
|
Positioned(
|
|
|
|
Positioned(
|
|
|
|
top: 5, right: -3.5,
|
|
|
|
top: 11.5,
|
|
|
|
|
|
|
|
right: -4.5,
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.red,
|
|
|
|
color: Colors.red,
|
|
|
|
borderRadius: BorderRadius.circular(15),
|
|
|
|
borderRadius: BorderRadius.circular(15),
|
|
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.only(left: 5, right: 4.5),
|
|
|
|
padding: EdgeInsets.only(left: 7, right: 6.5),
|
|
|
|
height: 18,
|
|
|
|
height: 18,
|
|
|
|
child: Center(child: Texts(orderPreviewViewModel.cartResponse.quantityCount.toString(), style: "caption", medium: true, color: Colors.white,)),
|
|
|
|
child: Center(
|
|
|
|
|
|
|
|
child: Texts(
|
|
|
|
|
|
|
|
orderPreviewViewModel.cartResponse.quantityCount.toString(),
|
|
|
|
|
|
|
|
style: "caption",
|
|
|
|
|
|
|
|
medium: true,
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|