fetchCoupons static method
Implementation
static Future<List<NetmeraCouponDetail>> fetchCoupons(int page, int max) async {
return await _platform.invokeMethod(_FETCH_COUPONS, {"page": page, "max": max}).then((receivedJson) {
List<NetmeraCouponDetail> couponList = List.empty(growable: true);
receivedJson.forEach((item) {
couponList.add(NetmeraCouponDetail.fromJson(item));
});
return couponList;
});
}