pagination

This commit is contained in:
2025-02-14 18:52:46 +05:30
parent 9874c094a9
commit e3b601ee7d
9 changed files with 504 additions and 191 deletions

View File

@@ -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));