home page
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user