getGrnTransationList method
void
getGrnTransationList()
Implementation
void getGrnTransationList() async {
try {
Helper.progressDialog(Get.context!, "Please wait..");
await ApiClient(baseUrl: ApiConstant.armBaseUrl)
.getGrnTransactions(
filterStatus: "IN_TRANSIT",
filterPartnerId: storage.read("PARTNER_ID_LOGIN"),
sort: "id",
orderBy: "ASC",
pageNo: 0,
perPageCount: 10)
.then((value) {
Get.back();
grnTransactionList.value = value.data?.content ?? [];
}).catchError((onError) {
Get.back();
GenericResponse res = GenericResponse.fromJson(onError?.response?.data);
Helper.messageDialog(
Get.context!,
res.responseCode ?? "Try again!!",
res.responseMessage ?? "Something went wrong",
);
});
} catch (e) {
Get.back();
}
}