home page

This commit is contained in:
2025-02-24 18:54:00 +05:30
parent 27c3a14646
commit 71d0991366
19 changed files with 716 additions and 143 deletions

View File

@@ -122,13 +122,15 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
)),
);
} else if (provider.products.isEmpty) {
return Padding(
padding: const EdgeInsets.only(left: 40),
child: DataNotFound(
imagePath: 'assets/images/cart.jpg',
message: "Product not abailable ",
width: 200.w,
height: 250.h,
return Center(
child: Padding(
padding: const EdgeInsets.only(left: 40),
child: DataNotFound(
imagePath: 'assets/images/cart.jpg',
message: "Product not abailable ",
width: 200.w,
height: 250.h,
),
),
);
} else {
@@ -179,16 +181,16 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
var product = provider.products[index];
return InkWell(
onTap: () {
context.push(MyRoutes.PRODUCTDETAILS,
// extra: product.id
context.push(
MyRoutes.PRODUCTDETAILS,
// extra: product.id
extra: {
extra: {
"id": product.id,
"quantity": 0,
"price": "0",
},
);
);
},
child: Container(
height: itemHeight,
@@ -474,7 +476,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
),
));
} else if (provider.categoryList.isEmpty) {
return Center(child: Text('No products available'));
return SizedBox.shrink();
} else {
return Container(
decoration: const BoxDecoration(color: Colors.white),