fixed issue add to cart
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:grocery_app/src/common_widget/network_image.dart';
|
||||
import 'package:grocery_app/src/core/routes/routes.dart';
|
||||
import 'package:grocery_app/src/logic/provider/bottom_navbar_provider.dart';
|
||||
import 'package:grocery_app/src/logic/provider/home_provider.dart';
|
||||
import 'package:grocery_app/src/ui/data_notfound.dart';
|
||||
import 'package:grocery_app/src/ui/header.dart';
|
||||
import 'package:grocery_app/utils/constants/color_constant.dart';
|
||||
import 'package:grocery_app/utils/extensions/uicontext.dart';
|
||||
@@ -146,7 +148,13 @@ class _FavouriteScreenState extends State<FavouriteScreen>
|
||||
return Expanded(
|
||||
child: _buildSkeletonLoader()); // Show Skeleton while loading
|
||||
} else if (provider.wishListItem.isEmpty) {
|
||||
return Expanded(child: Center(child: Text('No products available')));
|
||||
return Expanded(
|
||||
child: DataNotFound(
|
||||
imagePath: 'assets/images/wishlist.jpg',
|
||||
message: "Your Wish list is empty. Please add some items",
|
||||
width: 250.w,
|
||||
height: 200.h,
|
||||
));
|
||||
} else {
|
||||
return Expanded(
|
||||
child: ListView.separated(
|
||||
@@ -162,7 +170,15 @@ class _FavouriteScreenState extends State<FavouriteScreen>
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
context.push(MyRoutes.PRODUCTDETAILS, extra: productId);
|
||||
context.push(MyRoutes.PRODUCTDETAILS,
|
||||
// extra: productId
|
||||
|
||||
extra: {
|
||||
"id":productId,
|
||||
"quantity": 0,
|
||||
"price": "0",
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
|
||||
Reference in New Issue
Block a user