This commit is contained in:
2025-01-28 19:05:19 +05:30
parent b9cd807bbc
commit 3121e0ee36
24 changed files with 1347 additions and 1446 deletions

View File

@@ -17,31 +17,49 @@ class ProductService extends ApiService {
return response;
}
Future getAllProduct(data) async
{
var response = await api.get(APIURL.getAllProduct, data: jsonEncode(data));
Future getAllProduct(data, id) async {
var response;
if (id.isEmpty) {
response =
await api.get(APIURL.getAllProduct, data: jsonEncode(data));
}
else{
response = await api.get(APIURL.getAllProduct+ id, data: jsonEncode(data));
}
return response;
}
Future getBestDealProduct(data) async
{
var response = await api.get(APIURL.getBestDealProduct, data: jsonEncode(data));
Future getBestDealProduct(data) async {
var response =
await api.get(APIURL.getBestDealProduct, data: jsonEncode(data));
return response;
}
Future getAllcategory(data) async
{
Future getAllcategory(data) async {
var response = await api.get(APIURL.getAllcategory, data: jsonEncode(data));
return response;
}
Future addToWish(data) async {
var response = await api.post(APIURL.addToWish, data: jsonEncode(data));
return response;
}
Future addToCart(data) async {
var response = await api.post(APIURL.addToCart, data: jsonEncode(data));
return response;
}
Future getBanners(data) async {
var response = await api.get(APIURL.getBanners, data: jsonEncode(data));
@@ -50,7 +68,8 @@ class ProductService extends ApiService {
}
Future customerLogOut(data) async {
var response = await api.post(APIURL.customerLogOut, data: jsonEncode(data));
var response =
await api.post(APIURL.customerLogOut, data: jsonEncode(data));
return response;
}