pagination
This commit is contained in:
@@ -23,7 +23,8 @@ class ProductService extends ApiService {
|
||||
var response;
|
||||
|
||||
if (id.isEmpty) {
|
||||
response = await api.get(APIURL.getAllProduct, data: jsonEncode(data));
|
||||
response = await api.get(APIURL.getAllProduct,
|
||||
queryParameters: data, data: data);
|
||||
} else {
|
||||
response =
|
||||
await api.get(APIURL.getAllProduct + id, data: jsonEncode(data));
|
||||
@@ -42,8 +43,8 @@ class ProductService extends ApiService {
|
||||
//
|
||||
|
||||
Future getBestDealProduct(data) async {
|
||||
var response =
|
||||
await api.get(APIURL.getBestDealProduct, data: jsonEncode(data));
|
||||
var response = await api.get(APIURL.getBestDealProduct,
|
||||
queryParameters: data, data: jsonEncode(data));
|
||||
|
||||
return response;
|
||||
}
|
||||
@@ -80,22 +81,18 @@ class ProductService extends ApiService {
|
||||
|
||||
return response;
|
||||
}
|
||||
Future offerCoupon(data) async {
|
||||
|
||||
Future offerCoupon(data) async {
|
||||
var response = await api.get(APIURL.offerCoupon, data: jsonEncode(data));
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Future applyCoupon(data) async {
|
||||
Future applyCoupon(data) async {
|
||||
var response = await api.post(APIURL.applyCoupon, data: jsonEncode(data));
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Future checkPin(data, pin) async {
|
||||
var response = await api.get(APIURL.checkPin + pin, data: jsonEncode(data));
|
||||
|
||||
Reference in New Issue
Block a user