home page
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:grocery_app/src/core/routes/routes.dart';
|
||||
import 'package:grocery_app/src/data/all_cart_items.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/utils/constants/assets_constant.dart';
|
||||
import 'package:grocery_app/utils/constants/color_constant.dart';
|
||||
import 'package:grocery_app/utils/constants/shared_pref_utils.dart';
|
||||
@@ -281,7 +282,13 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
||||
),
|
||||
);
|
||||
} else if (provider.bestdeal.isEmpty) {
|
||||
return Center(child: Text('No products available'));
|
||||
return Center(
|
||||
child: DataNotFound(
|
||||
imagePath: 'assets/images/cart.jpg',
|
||||
message: "Sorry! Don't have a product",
|
||||
width: 300.w,
|
||||
height: 300.h,
|
||||
));
|
||||
} else {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(15),
|
||||
@@ -298,17 +305,14 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
||||
var bestdealproduct = provider.bestdeal[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
context.push(MyRoutes.PRODUCTDETAILS,
|
||||
|
||||
|
||||
extra: {
|
||||
"id": bestdealproduct.id,
|
||||
"quantity": 0,
|
||||
"price": '0',
|
||||
},
|
||||
|
||||
|
||||
);
|
||||
context.push(
|
||||
MyRoutes.PRODUCTDETAILS,
|
||||
extra: {
|
||||
"id": bestdealproduct.id,
|
||||
"quantity": 0,
|
||||
"price": '0',
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
|
||||
Reference in New Issue
Block a user