getGrnTransationList method

void getGrnTransationList()

Implementation

void getGrnTransationList() async {
  Helper.progressDialog(Get.context!, "");
  await ApiClient(baseUrl: ApiConstant.armBaseUrl)
      .getGrnTransactions(
          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",
    );
  });
}