productdetails
This commit is contained in:
@@ -21,16 +21,24 @@ class ProductService extends ApiService {
|
||||
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));
|
||||
response = await api.get(APIURL.getAllProduct, data: jsonEncode(data));
|
||||
} else {
|
||||
response =
|
||||
await api.get(APIURL.getAllProduct + id, data: jsonEncode(data));
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Future getProductDetails(data, id) async {
|
||||
var response =
|
||||
await api.get(APIURL.getProductDetails + id, data: jsonEncode(data));
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Future getBestDealProduct(data) async {
|
||||
var response =
|
||||
await api.get(APIURL.getBestDealProduct, data: jsonEncode(data));
|
||||
@@ -44,55 +52,50 @@ class ProductService extends ApiService {
|
||||
return response;
|
||||
}
|
||||
|
||||
Future similarProduct(data,id) async {
|
||||
var response = await api.get(APIURL.similarProduct+id+"/similar", data: jsonEncode(data));
|
||||
Future similarProduct(data, id) async {
|
||||
var response = await api.get(APIURL.similarProduct + id + "/similar",
|
||||
data: jsonEncode(data));
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Future getItemCards(data) async {
|
||||
Future getItemCards(data) async {
|
||||
var response = await api.get(APIURL.getItemCards, data: jsonEncode(data));
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Future checkPin(data,pin) async {
|
||||
var response = await api.get(APIURL.checkPin+pin, data: jsonEncode(data));
|
||||
Future checkPin(data, pin) async {
|
||||
var response = await api.get(APIURL.checkPin + pin, data: jsonEncode(data));
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
Future deleteItem(data, id) async {
|
||||
var response =
|
||||
await api.delete(APIURL.deleteItem + id, data: jsonEncode(data));
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Future addToWish(data) async {
|
||||
Future addToWish(data) async {
|
||||
var response = await api.post(APIURL.addToWish, data: jsonEncode(data));
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Future addToCart(data) async {
|
||||
Future addToCart(data) async {
|
||||
var response = await api.post(APIURL.addToCart, data: jsonEncode(data));
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Future gettAllWishList(data) async {
|
||||
var response = await api.get(APIURL.gettAllWishList, data: jsonEncode(data));
|
||||
Future gettAllWishList(data) async {
|
||||
var response =
|
||||
await api.get(APIURL.gettAllWishList, data: jsonEncode(data));
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Future getBanners(data) async {
|
||||
var response = await api.get(APIURL.getBanners, data: jsonEncode(data));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user