MyClaimStatusFunction method

Future MyClaimStatusFunction()

Implementation

Future MyClaimStatusFunction() async {
  MyAllClaimsList = [];
  var decodedResponse;
  final ApiBody = {
    "policy_no": policyList[indexvalue]['policy_no'].toString()
  };
  try {
    final response = await http.post(
        Uri.parse('${SDK_BASE_URL}claim_adminpanel/claim_api/claim_status'),
        body: ApiBody,
        headers: {"Authorization": "${SignUpController.currentUserToken}"});
    decodedResponse = json.decode(response.body);

    MyAllClaimsList = decodedResponse['my_claims'];
    trackstatus = decodedResponse['my_claims'];
  } catch (e) {
    errorListner(
        apiname: 'claim_adminpanel/claim_api/claim_status',
        responsed: "${decodedResponse}",
        request: '${ApiBody}',
        app_error: '${e}');
  }
}